From c10ad4214e858ed4a32747dc1d8d1f000586aed4 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Sun, 17 Jul 2022 23:49:27 +0300 Subject: [PATCH] neovim: disable formatting for jsonls --- neovim/.config/nvim/after/plugin/lsp.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/neovim/.config/nvim/after/plugin/lsp.lua b/neovim/.config/nvim/after/plugin/lsp.lua index 6bd5d61..9f9946c 100644 --- a/neovim/.config/nvim/after/plugin/lsp.lua +++ b/neovim/.config/nvim/after/plugin/lsp.lua @@ -68,6 +68,7 @@ local on_attach = function(client, bufnr) if vim.tbl_contains(lsps_with_disabled_formatting, client.name) then client.server_capabilities.document_formatting = false client.server_capabilities.document_range_formatting = false + client.server_capabilities.documentFormattingProvider = false end if client.name == "tailwindcss" then @@ -111,6 +112,9 @@ for _, server in ipairs(servers) do opts.filetypes = { "json", "jsonc" } opts.settings = { json = { + format = { + enable = false, + }, schemas = require("schemastore").json.schemas({ select = { ".eslintrc", @@ -146,6 +150,16 @@ for _, server in ipairs(servers) do experimental = { enableProjectDiagnostics = true, }, + javascript = { + format = { + enable = false, + }, + }, + typescript = { + format = { + enable = false, + }, + }, }, } end