17 lines
470 B
VimL
17 lines
470 B
VimL
|
" GoTo code navigation.
|
||
|
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 to show documentation in preview window.
|
||
|
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||
|
|
||
|
function! s:show_documentation()
|
||
|
if (index(['vim','help'], &filetype) >= 0)
|
||
|
execute 'h '.expand('<cword>')
|
||
|
else
|
||
|
call CocAction('doHover')
|
||
|
endif
|
||
|
endfunction
|