More coc keybindings

This commit is contained in:
Oliver Hartmann 2019-01-01 13:14:56 +01:00
parent b5f9e68cfe
commit 6c20c6589d

View File

@ -233,3 +233,16 @@ nnoremap <silent> <space>c :<C-u>Denite coc-command<cr>
nnoremap <silent> <space>s :<C-u>Denite coc-service<cr> nnoremap <silent> <space>s :<C-u>Denite coc-service<cr>
" Show links of current buffer " Show links of current buffer
nnoremap <silent> <space>l :<C-u>Denite coc-link<cr> nnoremap <silent> <space>l :<C-u>Denite coc-link<cr>
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K for show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if &filetype == 'vim'
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction