mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 19:30:01 +02:00
17 lines
677 B
VimL
17 lines
677 B
VimL
|
|
" Use tab for trigger completion with characters ahead and navigate.
|
|
" NOTE: There's always complete item selected by default, you may want to enable
|
|
" no select by `"suggest.noselect": true` in your configuration file.
|
|
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
|
" other plugin before putting this into your config.
|
|
inoremap <silent><expr> <TAB>
|
|
\ coc#pum#visible() ? coc#pum#next(1) :
|
|
\ CheckBackspace() ? "\<Tab>" :
|
|
\ coc#refresh()
|
|
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
|
|
|
function! CheckBackspace() abort
|
|
let col = col('.') - 1
|
|
return !col || getline('.')[col - 1] =~# '\s'
|
|
endfunction
|
|
|