diff --git a/plugins/lsp/lspconfig.lua b/plugins/lsp/lspconfig.lua index 8fa0306..8109665 100644 --- a/plugins/lsp/lspconfig.lua +++ b/plugins/lsp/lspconfig.lua @@ -44,17 +44,22 @@ capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) ------------------------------------------------------------------------------- -- See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md -- + +-- Override the default configuration to be applied to all servers +lsp_config.util.default_config = vim.tbl_extend("force", lsp_config.util.default_config, { + on_attach = on_attach, + capabilities = capabilities, +}) + -- nix -lsp_config.nil_ls.setup({ on_attach = on_attach, capabilities = capabilities }) +lsp_config.nil_ls.setup({}) -- js,ts -lsp_config.tsserver.setup({ on_attach = on_attach, capabilities = capabilities }) -lsp_config.eslint.setup({ on_attach = on_attach, capabilities = capabilities }) +lsp_config.tsserver.setup({}) +lsp_config.eslint.setup({}) -- rust lsp_config.rust_analyzer.setup({ - on_attach = on_attach, - capabilities = capabilities, -- Server-specific settings... settings = { ["rust-analyzer"] = {