From c90d004fbdd41f5b5bdae81b201b33d99d9aaa0d Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Mon, 6 Jun 2022 20:20:58 +0800 Subject: Update vim config --- .vim/after/plugin/deoplete.vim | 5 ++++ .vim/after/plugin/minpac.vim | 52 ++++++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/.vim/after/plugin/deoplete.vim b/.vim/after/plugin/deoplete.vim index d478aba..a422890 100644 --- a/.vim/after/plugin/deoplete.vim +++ b/.vim/after/plugin/deoplete.vim @@ -20,3 +20,8 @@ call deoplete#custom#option({ call deoplete#custom#source('ultisnips', 'rank', 1000) call deoplete#custom#source('lsp', 'rank', 900) + +function! s:my_cr_function() abort + return deoplete#close_popup() . "\" +endfunction +inoremap =my_cr_function() diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim index 0af0717..a30e3ab 100644 --- a/.vim/after/plugin/minpac.vim +++ b/.vim/after/plugin/minpac.vim @@ -28,30 +28,32 @@ function! InitMinpac() abort call minpac#add('https://github.com/thomasfaingnaert/vim-lsp-snippets', {'type': 'opt'}) call minpac#add('https://github.com/thomasfaingnaert/vim-lsp-ultisnips', {'type': 'opt'}) - call minpac#add('https://github.com/nvim-lua/plenary.nvim', {'type': 'opt'}) - call minpac#add('https://github.com/sindrets/diffview.nvim', {'type': 'opt'}) - call minpac#add('https://github.com/f-person/git-blame.nvim', {'type': 'opt'}) - - call minpac#add('https://github.com/simrat39/symbols-outline.nvim', {'type': 'opt'}) - - call minpac#add('https://github.com/neovim/nvim-lspconfig', {'type': 'opt'}) - call minpac#add('https://github.com/ray-x/lsp_signature.nvim', {'type': 'opt'}) - - call minpac#add('https://github.com/mfussenegger/nvim-dap', {'type': 'opt'}) - call minpac#add('https://github.com/rcarriga/nvim-dap-ui', {'type': 'opt'}) - call minpac#add('https://github.com/leoluz/nvim-dap-go', {'type': 'opt'}) - - call minpac#add('https://github.com/hrsh7th/nvim-cmp', {'type': 'opt'}) - call minpac#add('https://github.com/hrsh7th/cmp-buffer', {'type': 'opt'}) - call minpac#add('https://github.com/hrsh7th/cmp-path', {'type': 'opt'}) - call minpac#add('https://github.com/hrsh7th/cmp-nvim-lsp', {'type': 'opt'}) - call minpac#add('https://github.com/hrsh7th/cmp-cmdline', {'type': 'opt'}) - call minpac#add('https://github.com/quangnguyen30192/cmp-nvim-ultisnips', {'type': 'opt'}) - - call minpac#add('https://github.com/nvim-treesitter/nvim-treesitter', { - \ 'type': 'opt', - \ 'do': 'if has("nvim") | packadd nvim-treesitter | :TSUpdate | endif', - \ }) + if has('nvim') + call minpac#add('https://github.com/nvim-lua/plenary.nvim', {'type': 'opt'}) + call minpac#add('https://github.com/sindrets/diffview.nvim', {'type': 'opt'}) + call minpac#add('https://github.com/f-person/git-blame.nvim', {'type': 'opt'}) + + call minpac#add('https://github.com/simrat39/symbols-outline.nvim', {'type': 'opt'}) + + call minpac#add('https://github.com/neovim/nvim-lspconfig', {'type': 'opt'}) + call minpac#add('https://github.com/ray-x/lsp_signature.nvim', {'type': 'opt'}) + + call minpac#add('https://github.com/mfussenegger/nvim-dap', {'type': 'opt'}) + call minpac#add('https://github.com/rcarriga/nvim-dap-ui', {'type': 'opt'}) + call minpac#add('https://github.com/leoluz/nvim-dap-go', {'type': 'opt'}) + + call minpac#add('https://github.com/hrsh7th/nvim-cmp', {'type': 'opt'}) + call minpac#add('https://github.com/hrsh7th/cmp-buffer', {'type': 'opt'}) + call minpac#add('https://github.com/hrsh7th/cmp-path', {'type': 'opt'}) + call minpac#add('https://github.com/hrsh7th/cmp-nvim-lsp', {'type': 'opt'}) + call minpac#add('https://github.com/hrsh7th/cmp-cmdline', {'type': 'opt'}) + call minpac#add('https://github.com/quangnguyen30192/cmp-nvim-ultisnips', {'type': 'opt'}) + + call minpac#add('https://github.com/nvim-treesitter/nvim-treesitter', { + \ 'type': 'opt', + \ 'do': 'if has("nvim") | packadd nvim-treesitter | :TSUpdate | endif', + \ }) + endif call minpac#add('https://github.com/Shougo/deoplete.nvim', {'type': 'opt'}) call minpac#add('https://github.com/roxma/nvim-yarp', {'type': 'opt'}) @@ -109,7 +111,7 @@ function! InitMinpac() abort call minpac#add('https://github.com/chr4/nginx.vim') call minpac#add('https://github.com/iamcco/markdown-preview.nvim', { \ 'type': 'start', - \ 'do': 'call mkdp#util#install()'}) + \ 'do': 'packloadall! | call mkdp#util#install()'}) let g:minpac_initialized = 1 endfunction -- cgit v1.2.3