plugin/lsp: move common settings to default config

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-17 00:38:58 +03:00
parent 865db595c9
commit d4620d3d6e
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -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 -- 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 -- nix
lsp_config.nil_ls.setup({ on_attach = on_attach, capabilities = capabilities }) lsp_config.nil_ls.setup({})
-- js,ts -- js,ts
lsp_config.tsserver.setup({ on_attach = on_attach, capabilities = capabilities }) lsp_config.tsserver.setup({})
lsp_config.eslint.setup({ on_attach = on_attach, capabilities = capabilities }) lsp_config.eslint.setup({})
-- rust -- rust
lsp_config.rust_analyzer.setup({ lsp_config.rust_analyzer.setup({
on_attach = on_attach,
capabilities = capabilities,
-- Server-specific settings... -- Server-specific settings...
settings = { settings = {
["rust-analyzer"] = { ["rust-analyzer"] = {