use lsp to format json

This commit is contained in:
Chris 2021-06-29 13:48:58 -04:00
parent 02865aba7b
commit 38a0668e4d
2 changed files with 2 additions and 1 deletions

View file

@ -92,7 +92,7 @@ require"lspconfig".efm.setup {
-- init_options = {initializationOptions}, -- init_options = {initializationOptions},
cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"}, cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},
init_options = {documentFormatting = true, codeAction = false}, init_options = {documentFormatting = true, codeAction = false},
filetypes = {"lua", "python", "javascriptreact", "javascript", "typescript","typescriptreact","sh", "html", "css", "json", "yaml", "markdown", "vue"}, filetypes = {"lua", "python", "javascriptreact", "javascript", "typescript","typescriptreact","sh", "html", "css", "yaml", "markdown", "vue"},
settings = { settings = {
rootMarkers = {".git/"}, rootMarkers = {".git/"},
languages = { languages = {

View file

@ -72,6 +72,7 @@ O.lang.tsserver.linter = nil
O.lang.tsserver.autoformat = true O.lang.tsserver.autoformat = true
-- json -- json
O.lang.json.active = true
O.lang.json.autoformat = true O.lang.json.autoformat = true
-- ruby -- ruby