feat(neovim): improve completion config

This commit is contained in:
Felix Schröter 2021-03-12 14:18:19 +01:00
parent 3b7b90a219
commit 6d2feca4c8
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58

View file

@ -1,11 +1,12 @@
" autocomplete config " autocomplete config
set completeopt=menu,preview,menuone,noinsert set completeopt=menuone,noinsert
set shortmess+=c
" let g:completion_timer_cycle = 20
" enable completion-nvim in all buffers
autocmd BufEnter * lua require'completion'.on_attach() autocmd BufEnter * lua require'completion'.on_attach()
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
let g:completion_matching_smart_case = 1
" Use <Tab> and <S-Tab> to navigate through popup menu " Use <Tab> and <S-Tab> to navigate through popup menu
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"