Browse Source

lsp commands and changes

master
Juni Kim 1 year ago
parent
commit
58faa94920
  1. 17
      after/plugin/lsp.lua

17
after/plugin/lsp.lua

@ -3,12 +3,27 @@
local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.nvim_workspace()
local cmp = require('cmp')
local cmp_select = { behavior = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-s>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
})
cmp_mappings['<Tab>'] = nil
cmp_mappings['<S-Tab>'] = nil
lsp.setup_nvim_cmp({
mapping = cmp_mappings,
experimental = {
ghost_text = true,
},
})
-- (Optional) Configure lua language server for neovim
lsp.nvim_workspace()

Loading…
Cancel
Save