summaryrefslogtreecommitdiff
path: root/plug-config/coc.vim
diff options
context:
space:
mode:
Diffstat (limited to 'plug-config/coc.vim')
-rw-r--r--plug-config/coc.vim49
1 files changed, 21 insertions, 28 deletions
diff --git a/plug-config/coc.vim b/plug-config/coc.vim
index babae7ed..428230d1 100644
--- a/plug-config/coc.vim
+++ b/plug-config/coc.vim
@@ -22,10 +22,6 @@ else
imap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
endif
-" Use `[g` and `]g` to navigate diagnostics
-nmap <silent> [g <Plug>(coc-diagnostic-prev)
-nmap <silent> ]g <Plug>(coc-diagnostic-next)
-
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
@@ -49,10 +45,6 @@ autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
-" Formatting selected code.
-xmap <leader>f <Plug>(coc-format-selected)
-nmap <leader>f <Plug>(coc-format-selected)
-
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
@@ -63,13 +55,13 @@ augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
-xmap <leader>a <Plug>(coc-codeaction-selected)
-nmap <leader>a <Plug>(coc-codeaction-selected)
+" xmap <leader>a <Plug>(coc-codeaction-selected)
+" nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current line.
-nmap <leader>ac <Plug>(coc-codeaction)
+" nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
-nmap <leader>qf <Plug>(coc-fix-current)
+" nmap <leader>qf <Plug>(coc-fix-current)
" Introduce function text object
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
@@ -100,21 +92,22 @@ set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Mappings using CoCList:
" Show all diagnostics.
-nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
-" Manage extensions.
-nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
-" Show commands.
-nnoremap <silent> <space>c :<C-u>CocList commands<cr>
-" Find symbol of current document.
-nnoremap <silent> <space>o :<C-u>CocList outline<cr>
-" Search workspace symbols.
-nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
-" Do default action for next item.
-nnoremap <silent> <space>j :<C-u>CocNext<CR>
-" Do default action for previous item.
-nnoremap <silent> <space>k :<C-u>CocPrev<CR>
-" Resume latest coc list.
-nnoremap <silent> <space>p :<C-u>CocListResume<CR>
+" TODO add these to which key
+" nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
+" " Manage extensions.
+" nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
+" " Show commands.
+" nnoremap <silent> <space>c :<C-u>CocList commands<cr>
+" " Find symbol of current document.
+" nnoremap <silent> <space>o :<C-u>CocList outline<cr>
+" " Search workspace symbols.
+" nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
+" " Do default action for next item.
+" nnoremap <silent> <space>j :<C-u>CocNext<CR>
+" " Do default action for previous item.
+" nnoremap <silent> <space>k :<C-u>CocPrev<CR>
+" " Resume latest coc list.
+" nnoremap <silent> <space>p :<C-u>CocListResume<CR>
" Explorer
let g:coc_explorer_global_presets = {
@@ -137,5 +130,5 @@ let g:coc_explorer_global_presets = {
\ }
"nmap <silent> <space>e :CocCommand explorer<CR>
nnoremap <silent> <leader>e :CocCommand explorer<CR>
-nmap <space>f :CocCommand explorer --preset floatingRightside<CR>
+" nmap <space>f :CocCommand explorer --preset floatingRightside<CR>
autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif