plugins: remove uneccessary config for COC
* Removes key mapping for the coc-completion which does not use the built-in vim completion mechanism anymore. Co-Authored-by: iGor milhit <igor@milhit.ch>main
parent
c293cf8809
commit
37e28c58d1
23
init.vim
23
init.vim
|
@ -190,29 +190,6 @@ else
|
||||||
set signcolumn=yes
|
set signcolumn=yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Use tab for trigger completion with characters ahead and navigate
|
|
||||||
inoremap <silent><expr> <TAB>
|
|
||||||
\ pumvisible() ? "\<C-n>" :
|
|
||||||
\ <SID>check_back_space() ? "\<TAB>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
|
||||||
|
|
||||||
function! s:check_back_space() abort
|
|
||||||
let col = col('.') - 1
|
|
||||||
return !col || getline('.')[col - 1] =~# '\s'
|
|
||||||
endfunction
|
|
||||||
" Use <c-space> to trigger completion.
|
|
||||||
if has('nvim')
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
else
|
|
||||||
inoremap <silent><expr> <c-@> coc#refresh()
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
|
||||||
" format on enter, <cr> could be remapped by other vim plugin
|
|
||||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
|
||||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
|
||||||
|
|
||||||
" Use `[g` and `]g` to navigate diagnostics
|
" Use `[g` and `]g` to navigate diagnostics
|
||||||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||||
|
|
Loading…
Reference in New Issue