Add do#show_documentation() using coc.nvim

Change the `K` normal mode overrides to use the example given in the
coc.nvim README file which uses Vim's builtin help when in `vim` or
`help` files, or checks if coc.nvim is ready and invokes
`CocActionAsync('doHover')`, otherwise fallback to using `keywordprg`.
This commit is contained in:
2021-02-22 20:48:33 +00:00
parent ecd8659df7
commit 3a2337cd63
6 changed files with 17 additions and 17 deletions

View File

@@ -15,5 +15,3 @@ nnoremap K :YcmCompleter GetDoc<CR>
let b:surround_{char2nr("t")} = "TODO(\r):"
" "ys{motion}/" turns "text" into "/*text*/"
let b:surround_{char2nr("/")} = "/*\r*/"
" Map K to get YouCompleteMe documentation.
nnoremap K :YcmCompleter GetDoc<CR>

View File

@@ -1,5 +1,3 @@
" Add Doxygen documentation generation plugin.
packadd DoxygenToolkit.vim
nnoremap <leader>d :Dox<CR>
" Map K to get YouCompleteMe documentation
nnoremap K :YcmCompleter GetDoc<CR>

View File

@@ -25,6 +25,3 @@ setlocal encoding=utf-8
" Set up file format
setlocal fileformat=unix
let g:python_highlight_all=1
" Mappings
nnoremap K :YcmCompleter GetDoc<CR>

View File

@@ -1,9 +1,6 @@
" Add omnifunc completion package.
packadd vimomni
" Mapping for Vim help of the word under cursor.
nnoremap K :help <C-r><C-w><CR>
" Set custom fold expression
setlocal foldmethod=expr
setlocal foldexpr=VimFold(v:lnum)