diff --git a/.vimrc b/.vimrc index 4dc338a..ad15808 100644 --- a/.vimrc +++ b/.vimrc @@ -130,10 +130,21 @@ let g:coc_global_extensions = [ \'coc-snippets' \] " Autocomplete +imap (coc-snippets-expand) +nn es :CocCommand snippets.editSnippets ino pumvisible() ? "\" : \ coc#refresh() ino pumvisible() ? "\" : "k" ino complete_info()["selected"] != "-1" ? "\" : "\u\" +" Show doccumentation +fu! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction +nnoremap K :call show_documentation() " Code action on cursor position nm do (coc-codeaction) " Coc statusline