Disable coc bindings when coc not loaded.

This commit is contained in:
Alex Manning 2024-07-14 21:52:26 +00:00
parent 3ab0a641a4
commit 69518afa81

View file

@ -59,6 +59,8 @@ let g:vimspector_install_gadgets = ['debugpy']
" Config for Coc originally from their github.
" Use tab for trigger completion with characters ahead and navigate
" If node is not available Coc will not be loaded so disable.
if executable('node') " Coc only works if nodejs is available.
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
@ -77,3 +79,4 @@ function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
endif