Added some CoC keybindings
parent
7f776d0fd2
commit
07a5238bf9
15
init/coc.vim
15
init/coc.vim
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
let NERDTreeIgnore = ['\.vim$', '__pycache__', '\.pytest_cache', 'venv', '.*\.egg-info', 'dist', 'build', '\.eggs',
|
||||
\ '.git']
|
||||
let NERDTreeShowHidden = 1
|
|
@ -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
|
||||
|
|
Reference in New Issue