From 7edcb8133bfd469458f94039021d74258b3bf72c Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 1 Jun 2020 18:14:07 +0200 Subject: vim: remove coc and add nvim-lsp+compl --- .vim/after/plugin/coc.vim | 86 ----------------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 .vim/after/plugin/coc.vim (limited to '.vim/after/plugin/coc.vim') diff --git a/.vim/after/plugin/coc.vim b/.vim/after/plugin/coc.vim deleted file mode 100644 index c0e8f38..0000000 --- a/.vim/after/plugin/coc.vim +++ /dev/null @@ -1,86 +0,0 @@ -" coc json config -> ../../coc-settings.json -finish - -if !exists('g:did_coc_loaded') - finish -endif - -set completeopt=noinsert,menuone,noselect -set completeopt-=preview -set shortmess+=c -" set showmatch - -" let g:coc_auto_copen = 1 -let g:coc_snippet_next = '' -let g:coc_snippet_prev = '' - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" inoremap -" \ pumvisible() ? "\" : -" \ check_back_space() ? "\" : -" \ coc#refresh() -inoremap - \ pumvisible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ check_back_space() ? "\" : - \ coc#refresh() - -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\u\" -inoremap coc#refresh() - -vmap (coc-snippets-select) - -nmap [c (coc-diagnostic-next) -nmap ]c (coc-diagnostic-prev) -nmap lc :CocList diagnostics - -imap (coc-complete-custom) -nmap d (coc-definition) -nmap t (coc-type-definition) -nmap i (coc-implementation) -nmap r (coc-references) -nmap rn (coc-rename) -nmap qf (coc-fix-current) -nmap ac (coc-codeaction) - -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -xmap a (coc-codeaction-current) -nmap a (coc-codeaction-current) -nmap ac (coc-codeaction) - -nmap o :CocList outline - -function! s:show_doc() - if (index(['vim', 'help'], &filetype) >= 0) - execute 'h ' . expand('') - else - call CocAction('doHover') - endif -endfunction -nmap i :silent! call show_doc() - -au CursorHold * silent call CocActionAsync('highlight') - -command! -nargs=0 Format :call CocAction('format') -command! -nargs=? Fold :call CocAction('fold', ) - -let g:lightline.component_function.coc = 'LightLineCocStatus' -function! LightLineCocStatus() - let info = get(b:, 'coc_diagnostic_info', {}) - if empty(info) | return '' | endif - let msgs = [] - if get(info, 'error', 0) - call add(msgs, '✘ ' . info['error']) - endif - if get(info, 'warning', 0) - call add(msgs, '‼ ' . info['warning']) - endif - return 'coc: ' . join(msgs, ' ') -endfunction -- cgit 1.4.1