Disable coc.

This commit is contained in:
Gabriel Ebner 2020-06-25 14:03:49 +02:00
parent 0770bc5d26
commit b4d8372e17

126
vimrc

@ -107,7 +107,7 @@ Plug '~/dgapt', { 'rtp': 'vim' }
" Plug '~/lean.vim' " Plug '~/lean.vim'
Plug 'leanprover/lean.vim' Plug 'leanprover/lean.vim'
Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} " Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}}
Plug 'rickhowe/diffchar.vim' Plug 'rickhowe/diffchar.vim'
@ -202,65 +202,65 @@ augroup my_cm_setup
\ }) \ })
augroup END augroup END
" coc.nvim " " coc.nvim
"
"
inoremap <silent><expr> <c-space> coc#refresh() " inoremap <silent><expr> <c-space> coc#refresh()
"
" Use <cr> for confirm completion, `<C-g>u` means break undo chain at current position. " " Use <cr> for confirm completion, `<C-g>u` means break undo chain at current position.
" Coc only does snippet and additional edit on confirm. " " Coc only does snippet and additional edit on confirm.
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" " inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
"
" Use `[c` and `]c` for navigate diagnostics " " Use `[c` and `]c` for navigate diagnostics
nmap <silent> [c <Plug>(coc-diagnostic-prev) " nmap <silent> [c <Plug>(coc-diagnostic-prev)
nmap <silent> ]c <Plug>(coc-diagnostic-next) " nmap <silent> ]c <Plug>(coc-diagnostic-next)
"
" Remap keys for gotos " " Remap keys for gotos
nmap <silent> gd <Plug>(coc-definition) " nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition) " nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation) " nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references) " nmap <silent> gr <Plug>(coc-references)
"
" Use K for show documentation in preview window " " Use K for show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR> " nnoremap <silent> K :call <SID>show_documentation()<CR>
"
function! s:show_documentation() " function! s:show_documentation()
if &filetype == 'vim' " if &filetype == 'vim'
execute 'h '.expand('<cword>') " execute 'h '.expand('<cword>')
else " else
call CocAction('doHover') " call CocAction('doHover')
endif " endif
endfunction " endfunction
"
" Highlight symbol under cursor on CursorHold " " Highlight symbol under cursor on CursorHold
autocmd CursorHold * silent call CocActionAsync('highlight') " autocmd CursorHold * silent call CocActionAsync('highlight')
"
" Remap for rename current word " " Remap for rename current word
nmap <leader>rn <Plug>(coc-rename) " nmap <leader>rn <Plug>(coc-rename)
"
" Remap for format selected region " " Remap for format selected region
vmap <leader>f <Plug>(coc-format-selected) " vmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected) " nmap <leader>f <Plug>(coc-format-selected)
"
augroup mygroup " augroup mygroup
autocmd! " autocmd!
" Setup formatexpr specified filetype(s). " " Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') " autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder " " Update signature help on jump placeholder
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') " autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end " augroup end
"
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph " " Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
vmap <leader>a <Plug>(coc-codeaction-selected) " vmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected) " nmap <leader>a <Plug>(coc-codeaction-selected)
"
" Remap for do codeAction of current line " " Remap for do codeAction of current line
nmap <leader>ac <Plug>(coc-codeaction) " nmap <leader>ac <Plug>(coc-codeaction)
" Fix autofix problem of current line " " Fix autofix problem of current line
nmap <leader>qf <Plug>(coc-fix-current) " nmap <leader>qf <Plug>(coc-fix-current)
"
" Use `:Format` for format current buffer " " Use `:Format` for format current buffer
command! -nargs=0 Format :call CocAction('format') " command! -nargs=0 Format :call CocAction('format')
"
" Use `:Fold` for fold current buffer " " Use `:Fold` for fold current buffer
command! -nargs=? Fold :call CocAction('fold', <f-args>) " command! -nargs=? Fold :call CocAction('fold', <f-args>)