mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-12-28 09:13:59 +00:00
Merge dac395dac6ae1612c77a61811b41fa95d123fe42 into d350db2449da40df003c40d440f909d74e2d4e70
This commit is contained in:
commit
ea1ebf8dcd
45
init.lua
45
init.lua
@ -647,12 +647,6 @@ require('lazy').setup({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
|
||||||
-- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
|
|
||||||
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
|
|
||||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
--
|
--
|
||||||
@ -711,20 +705,31 @@ require('lazy').setup({
|
|||||||
})
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
-- Handle LSP setups
|
||||||
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
|
-- See :help vim.lsp.enable
|
||||||
automatic_installation = false,
|
for server, config in pairs(servers) do
|
||||||
handlers = {
|
vim.lsp.config(server, config)
|
||||||
function(server_name)
|
vim.lsp.enable(server)
|
||||||
local server = servers[server_name] or {}
|
end
|
||||||
-- This handles overriding only values explicitly passed
|
-- NOTE: Some servers still require the nvim-lspconfig setup until they are updated
|
||||||
-- by the server configuration above. Useful when disabling
|
-- Use this template inside the for loop if you encounter issues with an lsp
|
||||||
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
--
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
-- if server == 'example_server' or server == 'example_server2' then
|
||||||
require('lspconfig')[server_name].setup(server)
|
-- -- This handles overriding only values explicitly passed
|
||||||
end,
|
-- -- by the server configuration above. Useful when disabling
|
||||||
},
|
-- -- certain features of an LSP (for example, turning off formatting for ts_ls)
|
||||||
}
|
-- local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
|
-- config.capabilities = vim.tbl_deep_extend('force', {}, capabilities, config.capabilities or {})
|
||||||
|
-- require('mason-lspconfig')[server].setup(config)
|
||||||
|
-- else
|
||||||
|
-- vim.lsp.config(server, config)
|
||||||
|
-- vim.lsp.enable(server)
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||||
|
-- With nvim-lspconfig setup, Neovim doesn't support everything that is in the LSP specification.
|
||||||
|
-- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||||
|
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user