Drop UltiSnips and move to coc-snippets

Also change the completion confirm mapping to <TAB> and make the
priority of snippets higher.
This commit is contained in:
Kenneth Benzie 2023-01-25 00:39:26 +00:00
parent 226765f88a
commit 24de16b587
4 changed files with 12 additions and 11 deletions

View File

@ -7,6 +7,7 @@
"diagnostic.infoSign": "▸", "diagnostic.infoSign": "▸",
"diagnostic.warningSign": "▸", "diagnostic.warningSign": "▸",
"powershell.integratedConsole.showOnStartup": false, "powershell.integratedConsole.showOnStartup": false,
"snippets.priority": 100,
"suggest.noselect": true, "suggest.noselect": true,
"yaml.schemas": { "yaml.schemas": {
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json": [ "https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json": [

View File

@ -1,12 +1,13 @@
" coc.nvim " coc.nvim
nmap <silent> <leader>fi <Plug>(coc-fix-current) inoremap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<TAB>"
nmap <silent> <leader>gd <Plug>(coc-definition) nnoremap <silent> <leader>fi <Plug>(coc-fix-current)
nmap <silent> <leader>gt <Plug>(coc-type-definition) nnoremap <silent> <leader>gd <Plug>(coc-definition)
nmap <silent> <leader>sd <Plug>(coc-diagnostic-info) nnoremap <silent> <leader>gt <Plug>(coc-type-definition)
nmap <silent> <leader>gr <Plug>(coc-references) nnoremap <silent> <leader>sd <Plug>(coc-diagnostic-info)
nmap <silent> K :call do#show_documentation()<CR> nnoremap <silent> <leader>gr <Plug>(coc-references)
nmap <silent> <C-n> <Plug>(coc-diagnostic-next) nnoremap <silent> K :call do#show_documentation()<CR>
nmap <silent> <C-p> <Plug>(coc-diagnostic-prev) nnoremap <silent> <C-n> <Plug>(coc-diagnostic-next)
nnoremap <silent> <C-p> <Plug>(coc-diagnostic-prev)
if has('nvim') if has('nvim')
" Make nvim :terminal more like vim :terminal " Make nvim :terminal more like vim :terminal

View File

@ -7,8 +7,7 @@
# Conqueror of Completion # Conqueror of Completion
- repo: neoclide/coc.nvim - repo: neoclide/coc.nvim
branch: release branch: release
# Snippet engine & snippets # Snippet collection
- repo: SirVer/ultisnips
- repo: honza/vim-snippets - repo: honza/vim-snippets
# Completion for vimscript # Completion for vimscript
- repo: vim-scripts/vimomni - repo: vim-scripts/vimomni

2
vimrc
View File

@ -59,7 +59,7 @@ let g:coc_global_extensions = [
\ 'coc-json', \ 'coc-json',
\ 'coc-marketplace', \ 'coc-marketplace',
\ 'coc-pyright', \ 'coc-pyright',
\ 'coc-ultisnips', \ 'coc-snippets',
\ 'coc-vimlsp', \ 'coc-vimlsp',
\ 'coc-yaml', \ 'coc-yaml',
\] \]