config for coc
parent
b891bc764c
commit
9be046d33d
|
|
@ -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 <C-H> <C-W>h
|
||||
nnoremap <C-J> <C-W>j
|
||||
" :inoremap <TAB> <C-N>
|
||||
" :inoremap <S-TAB> <TAB>
|
||||
"
|
||||
" #####################################################
|
||||
let g:coc_global_extensions=[ 'coc-snippets', 'coc-powershell', 'coc-sh', 'coc-omnisharp', 'coc-clangd' ]
|
||||
|
||||
" 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)
|
||||
|
||||
" Use <leader>x for convert visual selected code to snippet
|
||||
xmap <leader>x <Plug>(coc-convert-snippet)
|
||||
nnoremap <C-K> <C-W>k
|
||||
nnoremap <C-L> <C-W>l
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue