diff options
Diffstat (limited to 'plug-config')
-rw-r--r-- | plug-config/coc.vim | 58 |
1 files changed, 36 insertions, 22 deletions
diff --git a/plug-config/coc.vim b/plug-config/coc.vim index 709f971d..561cc0e9 100644 --- a/plug-config/coc.vim +++ b/plug-config/coc.vim @@ -1,25 +1,24 @@ - " let g:coc_global_extensions = [ - " \ 'coc-snippets', - " \ 'coc-actions', - " \ 'coc-emmet', - " \ 'coc-pairs', - " \ 'coc-tsserver', - " \ 'coc-floaterm', - " \ 'coc-html', - " \ 'coc-css', - " \ 'coc-cssmodules', - " \ 'coc-yaml', - " \ 'coc-python', - " \ 'coc-explorer', - " \ 'coc-svg', - " \ 'coc-prettier', - " \ 'coc-vimlsp', - " \ 'coc-flutter', - " \ 'coc-xml', - " \ 'coc-yank', - " \ 'coc-json', - " \ 'coc-vimtex', - " \ ] + let g:coc_global_extensions = [ + \ 'coc-snippets', + \ 'coc-actions', + \ 'coc-emmet', + \ 'coc-pairs', + \ 'coc-tsserver', + \ 'coc-floaterm', + \ 'coc-html', + \ 'coc-css', + \ 'coc-cssmodules', + \ 'coc-yaml', + \ 'coc-python', + \ 'coc-explorer', + \ 'coc-svg', + \ 'coc-prettier', + \ 'coc-vimlsp', + \ 'coc-xml', + \ 'coc-yank', + \ 'coc-json', + \ 'coc-vimtex', + \ ] " Use tab for trigger completion with characters ahead and navigate. inoremap <silent><expr> <TAB> @@ -155,3 +154,18 @@ let g:coc_explorer_global_presets = { " nmap <space>f :CocCommand explorer --preset floatingRightside<CR> autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif +" Snippets +" Use <C-l> for trigger snippet expand. +imap <C-l> <Plug>(coc-snippets-expand) + +" Use <C-j> for select text for visual placeholder of snippet. +vmap <C-j> <Plug>(coc-snippets-select) + +" Use <C-j> for jump to next placeholder, it's default of coc.nvim +let g:coc_snippet_next = '<c-j>' + +" Use <C-k> for jump to previous placeholder, it's default of coc.nvim +let g:coc_snippet_prev = '<c-k>' + +" Use <C-j> for both expand and jump (make expand higher priority.) +imap <C-j> <Plug>(coc-snippets-expand-jump) |