From 9be046d33d9eb71205ee4e6bdbad468b5d44cf02 Mon Sep 17 00:00:00 2001 From: The_miro Date: Mon, 31 Mar 2025 09:10:29 +0200 Subject: [PATCH] config for coc --- nvim/init.vim | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 77ac76b..b733e56 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -13,17 +13,7 @@ Plug 'vim-airline/vim-airline-themes' Plug 'voldikss/vim-floaterm' Plug 'rust-lang/rust.vim' - -Plug 'neovim/nvim-lspconfig' -Plug 'hrsh7th/cmp-nvim-lsp' -Plug 'hrsh7th/cmp-buffer' -Plug 'hrsh7th/cmp-path' -Plug 'hrsh7th/cmp-cmdline' -Plug 'hrsh7th/nvim-cmp' - -Plug 'hrsh7th/cmp-vsnip' -Plug 'hrsh7th/vim-vsnip' - +Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() colorscheme cyberqueer let g:airline_powerline_fonts = 1 @@ -94,8 +84,29 @@ let hostname=system('hostname -s | tr -d "\n"') let ipaddr=system('hostname -i | tr -d "\n"') let g:airline_section_x = 'IP:%{ipaddr} DNS:%{hostname}' -nnoremap h -nnoremap j +" :inoremap +" :inoremap +" +" ##################################################### +let g:coc_global_extensions=[ 'coc-snippets', 'coc-powershell', 'coc-sh', 'coc-omnisharp', 'coc-clangd' ] + +" Use for trigger snippet expand. +imap (coc-snippets-expand) + +" Use for select text for visual placeholder of snippet. +vmap (coc-snippets-select) + +" Use for jump to next placeholder, it's default of coc.nvim +let g:coc_snippet_next = '' + +" Use for jump to previous placeholder, it's default of coc.nvim +let g:coc_snippet_prev = '' + +" Use for both expand and jump (make expand higher priority.) +imap (coc-snippets-expand-jump) + +" Use x for convert visual selected code to snippet +xmap x (coc-convert-snippet) nnoremap k nnoremap l