new setup

This commit is contained in:
TJ DeVries 2022-12-20 15:19:43 -05:00
parent 01e80d152e
commit 81aaccd4ae

View file

@ -365,26 +365,30 @@ local servers = {
-- Setup neovim lua configuration
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
require('mason').setup()
-- 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),
}
-- 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)
for lsp, settings in ipairs(servers) do
require('lspconfig')[lsp].setup {
on_attach = on_attach,
mason_lspconfig.setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup {
capabilities = capabilities,
settings = settings,
on_attach = on_attach,
settings = servers[server_name],
}
end,
}
end
-- Turn on lsp status information
require('fidget').setup()