From 24de16b5873c304c454a5e10c8227bba04f98c28 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 25 Jan 2023 00:39:26 +0000 Subject: [PATCH] Drop UltiSnips and move to coc-snippets Also change the completion confirm mapping to and make the priority of snippets higher. --- coc-settings.json | 1 + plugin/mappings.vim | 17 +++++++++-------- tasks.yaml | 3 +-- vimrc | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/coc-settings.json b/coc-settings.json index e763567..2b985a8 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -7,6 +7,7 @@ "diagnostic.infoSign": "▸", "diagnostic.warningSign": "▸", "powershell.integratedConsole.showOnStartup": false, + "snippets.priority": 100, "suggest.noselect": true, "yaml.schemas": { "https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json": [ diff --git a/plugin/mappings.vim b/plugin/mappings.vim index a1e5234..80b7d91 100644 --- a/plugin/mappings.vim +++ b/plugin/mappings.vim @@ -1,12 +1,13 @@ " coc.nvim -nmap fi (coc-fix-current) -nmap gd (coc-definition) -nmap gt (coc-type-definition) -nmap sd (coc-diagnostic-info) -nmap gr (coc-references) -nmap K :call do#show_documentation() -nmap (coc-diagnostic-next) -nmap (coc-diagnostic-prev) +inoremap coc#pum#visible() ? coc#pum#confirm() : "\" +nnoremap fi (coc-fix-current) +nnoremap gd (coc-definition) +nnoremap gt (coc-type-definition) +nnoremap sd (coc-diagnostic-info) +nnoremap gr (coc-references) +nnoremap K :call do#show_documentation() +nnoremap (coc-diagnostic-next) +nnoremap (coc-diagnostic-prev) if has('nvim') " Make nvim :terminal more like vim :terminal diff --git a/tasks.yaml b/tasks.yaml index 9b60cee..b32002d 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -7,8 +7,7 @@ # Conqueror of Completion - repo: neoclide/coc.nvim branch: release - # Snippet engine & snippets - - repo: SirVer/ultisnips + # Snippet collection - repo: honza/vim-snippets # Completion for vimscript - repo: vim-scripts/vimomni diff --git a/vimrc b/vimrc index 01a0939..28d3d64 100644 --- a/vimrc +++ b/vimrc @@ -59,7 +59,7 @@ let g:coc_global_extensions = [ \ 'coc-json', \ 'coc-marketplace', \ 'coc-pyright', -\ 'coc-ultisnips', +\ 'coc-snippets', \ 'coc-vimlsp', \ 'coc-yaml', \]