new setup
This commit is contained in:
parent
01e80d152e
commit
81aaccd4ae
24
init.lua
24
init.lua
@ -365,26 +365,30 @@ local servers = {
|
|||||||
|
|
||||||
-- Setup neovim lua configuration
|
-- Setup neovim lua configuration
|
||||||
require('neodev').setup()
|
require('neodev').setup()
|
||||||
|
--
|
||||||
|
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
-- Setup mason so it can manage external tooling
|
-- Setup mason so it can manage external tooling
|
||||||
require('mason').setup()
|
require('mason').setup()
|
||||||
|
|
||||||
-- Ensure the servers above are installed
|
-- Ensure the servers above are installed
|
||||||
require('mason-lspconfig').setup {
|
local mason_lspconfig = require('mason-lspconfig')
|
||||||
|
|
||||||
|
mason_lspconfig.setup {
|
||||||
ensure_installed = vim.tbl_keys(servers),
|
ensure_installed = vim.tbl_keys(servers),
|
||||||
}
|
}
|
||||||
|
|
||||||
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
mason_lspconfig.setup_handlers {
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
function(server_name)
|
||||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
require('lspconfig')[server_name].setup {
|
||||||
|
|
||||||
for lsp, settings in ipairs(servers) do
|
|
||||||
require('lspconfig')[lsp].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
settings = settings,
|
on_attach = on_attach,
|
||||||
|
settings = servers[server_name],
|
||||||
}
|
}
|
||||||
end
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
-- Turn on lsp status information
|
-- Turn on lsp status information
|
||||||
require('fidget').setup()
|
require('fidget').setup()
|
||||||
|
Loading…
Reference in New Issue
Block a user