diff --git a/init.vim b/init.vim index 9853ad1..6269e45 100644 --- a/init.vim +++ b/init.vim @@ -233,3 +233,16 @@ nnoremap c :Denite coc-command nnoremap s :Denite coc-service " Show links of current buffer nnoremap l :Denite coc-link +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) +" Use K for show documentation in preview window +nnoremap K :call show_documentation() +function! s:show_documentation() + if &filetype == 'vim' + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction