diff --git a/vim-config/configs.vim b/vim-config/configs.vim index 8734f371..713556af 100644 --- a/vim-config/configs.vim +++ b/vim-config/configs.vim @@ -314,14 +314,27 @@ let g:ycm_filetype_specific_completion_to_disable = {} " Coc Configs " ----------- -" highlights, NOTE: this doesn't really work (didn't bother to fix it) +" Highlights, NOTE: this doesn't really work (didn't bother to fix it). highlight CocErrorSign ctermfg=Red ctermbg=Black highlight CocWarningSign ctermfg=Yellow ctermbg=Blue -" enable autocompletion on tab +" Enable autocompletion on tab. set completeopt=longest,menuone -" disable completion for TypeScript +" Use key up/down for scrolling documentation popup windows. +if has('nvim-0.4.3') || has('patch-8.2.0750') + nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" +endif + +" inoremap coc#util#has_float() ? FloatScroll(1) : "\" +" inoremap coc#util#has_float() ? FloatScroll(0) : "\" + +" Disable completion for TypeScript. autocmd BufNew,BufEnter *.ts execute "silent! CocDisable" autocmd BufLeave *.ts execute "silent! CocEnable"