added better rust-analyzer support.
This commit is contained in:
parent
e90208c701
commit
ed2b8c723d
3 changed files with 96 additions and 12 deletions
|
@ -3,7 +3,7 @@
|
|||
local luasnip = require 'luasnip'
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt='menu,menuone,preview,noinsert'
|
||||
vim.o.completeopt='menu,menuone,preview,noinsert,noselect'
|
||||
|
||||
-- nvim-cmp setup
|
||||
local cmp = require 'cmp'
|
||||
|
@ -21,8 +21,10 @@ cmp.setup {
|
|||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
-- behavior = cmp.ConfirmBehavior.Replace,
|
||||
-- select = false,
|
||||
},
|
||||
['<Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue