neovim: disable formatting for jsonls

This commit is contained in:
2022-07-17 23:49:27 +03:00
parent 55a1d54b16
commit c10ad4214e

View File

@@ -68,6 +68,7 @@ local on_attach = function(client, bufnr)
if vim.tbl_contains(lsps_with_disabled_formatting, client.name) then if vim.tbl_contains(lsps_with_disabled_formatting, client.name) then
client.server_capabilities.document_formatting = false client.server_capabilities.document_formatting = false
client.server_capabilities.document_range_formatting = false client.server_capabilities.document_range_formatting = false
client.server_capabilities.documentFormattingProvider = false
end end
if client.name == "tailwindcss" then if client.name == "tailwindcss" then
@@ -111,6 +112,9 @@ for _, server in ipairs(servers) do
opts.filetypes = { "json", "jsonc" } opts.filetypes = { "json", "jsonc" }
opts.settings = { opts.settings = {
json = { json = {
format = {
enable = false,
},
schemas = require("schemastore").json.schemas({ schemas = require("schemastore").json.schemas({
select = { select = {
".eslintrc", ".eslintrc",
@@ -146,6 +150,16 @@ for _, server in ipairs(servers) do
experimental = { experimental = {
enableProjectDiagnostics = true, enableProjectDiagnostics = true,
}, },
javascript = {
format = {
enable = false,
},
},
typescript = {
format = {
enable = false,
},
},
}, },
} }
end end