Update config/nvim/lua/plugins/lsp.lua

This commit is contained in:
Matthew Fisher 2024-08-28 14:12:09 -05:00
parent 53be73ceca
commit 500b95842c

View File

@ -20,7 +20,7 @@ end)
-- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md -- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md
require('mason').setup({}) require('mason').setup({})
require('mason-lspconfig').setup({ require('mason-lspconfig').setup({
ensure_installed = {'tsserver','dockerls','lua_ls','terraformls','pyright','gopls'}, ensure_installed = {'tsserver','dockerls','lua_ls','terraformls','pyright','gopls','volar'},
handlers = { handlers = {
function(server_name) function(server_name)
require('lspconfig')[server_name].setup({}) require('lspconfig')[server_name].setup({})
@ -36,7 +36,7 @@ cmp.setup({
{name = 'nvim_lsp'}, {name = 'nvim_lsp'},
}, },
mapping = { mapping = {
['<C-e>'] = cmp.mapping.confirm({select = false}), ['<CR>'] = cmp.mapping.confirm({select = false}),
['<C-q>'] = cmp.mapping.abort(), ['<C-q>'] = cmp.mapping.abort(),
['<Up>'] = cmp.mapping.select_prev_item({behavior = 'select'}), ['<Up>'] = cmp.mapping.select_prev_item({behavior = 'select'}),
['<Down>'] = cmp.mapping.select_next_item({behavior = 'select'}), ['<Down>'] = cmp.mapping.select_next_item({behavior = 'select'}),