Update nvimrc

This commit is contained in:
Rob Watson 2021-12-30 14:26:10 +01:00
parent 189ba6f92d
commit 4d8f632266
1 changed files with 7 additions and 2 deletions

9
nvimrc
View File

@ -289,7 +289,7 @@ EOF
" Function to eat trailing character when applying iabbrevs. " Function to eat trailing character when applying iabbrevs.
" https://stackoverflow.com/questions/11858927/preventing-trailing-whitespace-when-using-vim-abbreviations " https://stackoverflow.com/questions/11858927/preventing-trailing-whitespace-when-using-vim-abbreviations
func Eatchar(pat) func! Eatchar(pat)
let c = nr2char(getchar(0)) let c = nr2char(getchar(0))
return (c =~ a:pat) ? '' : c return (c =~ a:pat) ? '' : c
endfunc endfunc
@ -619,6 +619,7 @@ lua <<EOF
cmp.setup({ cmp.setup({
completion = { completion = {
completeopt = 'menu,menuone,noinsert', completeopt = 'menu,menuone,noinsert',
keyword_length = 3,
}, },
snippet = { snippet = {
expand = function(args) expand = function(args)
@ -649,7 +650,11 @@ lua <<EOF
comparators = { comparators = {
function(...) return cmp_buffer:compare_locality(...) end, function(...) return cmp_buffer:compare_locality(...) end,
} }
} },
experimental = {
native_menu = true,
ghost_text = true,
},
}) })
EOF EOF