Added some CoC keybindings

master
Jef Roosens 2020-08-28 09:15:08 +02:00
parent 7f776d0fd2
commit 07a5238bf9
4 changed files with 21 additions and 3 deletions

View File

@ -20,3 +20,18 @@ inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR
" Project refactoring keybinding
nnoremap <silent> <leader>pwr :CocSearch <C-R>=expand("<cword>")<CR><CR>
" Go to definition
nmap gd <Plug>(coc-definition)
nmap gi <Plug>(coc-implementation)
nmap gr <Plug>(coc-references)
" Jump between diagnostic positions
nmap <silent> dk <Plug>(coc-diagnostic-prev)
nmap <silent> dK <Plug>(coc-diagnostic-prev-error)
nmap <silent> dj <Plug>(coc-diagnostic-next)
nmap <silent> dJ <Plug>(coc-diagnostic-next-error)
" Show full diagnostics list
nmap <silent> <leader>dd :CocDiagnostics<CR>

View File

@ -6,9 +6,9 @@ nnoremap G Gzz
" Navigate between ctags
" Jump to definition
nnoremap gd <C-]>
" nnoremap gd <C-]>
" Go back up stack
nnoremap gb <C-t>
" nnoremap gb <C-t>
" Remap split navigation keybindings
nnoremap <silent> <leader>h :wincmd h<CR>

View File

@ -0,0 +1,3 @@
let NERDTreeIgnore = ['\.vim$', '__pycache__', '\.pytest_cache', 'venv', '.*\.egg-info', 'dist', 'build', '\.eggs',
\ '.git']
let NERDTreeShowHidden = 1

View File

@ -18,4 +18,4 @@ let g:no_status_line = 1
autocmd BufNewFile,BufReadPre *.py,*.java,*.rs,*.cpp,*.c TagbarOpen
" Explicitly close tagbar for these types
autocmd BufNewFile,BufReadPre *.md,*.vim,*.txt TagbarClose
autocmd BufNewFile,BufReadPre *.md,*.vim,*.txt,*.yaml,*.yml,*.rst TagbarClose