aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-06-05 13:01:02 +0800
committerGuangxiong Lin <[email protected]>2022-06-05 13:01:02 +0800
commitc1b2ff34508984f4f9ed40be72cd61f01b39b7a0 (patch)
tree28fe9752b5784fc5bf330e05c1c14a1b1d2c7ec2
parent47be6a508c4150f8ef2627ae185c650c081c6bbf (diff)
downloaddotfiles-c1b2ff34508984f4f9ed40be72cd61f01b39b7a0.tar.gz
dotfiles-c1b2ff34508984f4f9ed40be72cd61f01b39b7a0.tar.bz2
dotfiles-c1b2ff34508984f4f9ed40be72cd61f01b39b7a0.zip
Try deoplete and improve vim-lsp
-rw-r--r--.vim/after/plugin/deoplete.vim22
-rw-r--r--.vim/after/plugin/lsp.vim2
-rw-r--r--.vim/after/plugin/minpac.vim10
-rw-r--r--.vim/after/plugin/mucomplete.vim2
4 files changed, 35 insertions, 1 deletions
diff --git a/.vim/after/plugin/deoplete.vim b/.vim/after/plugin/deoplete.vim
new file mode 100644
index 0000000..d478aba
--- /dev/null
+++ b/.vim/after/plugin/deoplete.vim
@@ -0,0 +1,22 @@
+if has('nvim')
+ finish
+endif
+
+inoremap <silent><expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
+inoremap <silent><expr><s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
+
+let g:deoplete#enable_at_startup = 1
+
+packadd nvim-yarp
+packadd vim-hug-neovim-rpc
+packadd deoplete.nvim
+packadd deoplete-vim-lsp
+
+call deoplete#custom#option({
+ \ 'smart_case': v:true,
+ \ 'min_pattern_length': 1,
+ \ 'yarp': v:true,
+ \ })
+
+call deoplete#custom#source('ultisnips', 'rank', 1000)
+call deoplete#custom#source('lsp', 'rank', 900)
diff --git a/.vim/after/plugin/lsp.vim b/.vim/after/plugin/lsp.vim
index 07ca6aa..3e81ed0 100644
--- a/.vim/after/plugin/lsp.vim
+++ b/.vim/after/plugin/lsp.vim
@@ -6,6 +6,8 @@ let g:lsp_diagnostics_enabled = 0
let g:lsp_document_code_action_signs_enabled = 0
packadd vim-lsp
+packadd vim-lsp-snippets
+packadd vim-lsp-ultisnips
if executable('pylsp')
au User lsp_setup call lsp#register_server({
diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim
index a557fda..0af0717 100644
--- a/.vim/after/plugin/minpac.vim
+++ b/.vim/after/plugin/minpac.vim
@@ -19,12 +19,15 @@ function! InitMinpac() abort
call minpac#add('https://github.com/dense-analysis/ale.git', {'type': 'opt'})
call minpac#add('https://github.com/SirVer/ultisnips.git', {'type': 'opt'})
call minpac#add('https://github.com/honza/vim-snippets')
- call minpac#add('https://github.com/prabirshrestha/vim-lsp', {'type': 'opt'})
call minpac#add('https://github.com/ctrlpvim/ctrlp.vim.git', {'type': 'opt'})
call minpac#add('https://github.com/FelikZ/ctrlp-py-matcher.git', {'type': 'opt'})
call minpac#add('https://github.com/preservim/tagbar.git')
call minpac#add('https://github.com/puremourning/vimspector', {'type': 'opt'})
+ call minpac#add('https://github.com/prabirshrestha/vim-lsp', {'type': 'opt'})
+ 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'})
@@ -50,6 +53,11 @@ function! InitMinpac() abort
\ 'do': 'if has("nvim") | packadd nvim-treesitter | :TSUpdate | endif',
\ })
+ call minpac#add('https://github.com/Shougo/deoplete.nvim', {'type': 'opt'})
+ call minpac#add('https://github.com/roxma/nvim-yarp', {'type': 'opt'})
+ call minpac#add('https://github.com/roxma/vim-hug-neovim-rpc', {'type': 'opt'})
+ call minpac#add('https://github.com/lighttiger2505/deoplete-vim-lsp', {'type': 'opt'})
+
call minpac#add('https://github.com/ludovicchabant/vim-gutentags.git', {'type': 'opt'})
call minpac#add('https://github.com/easymotion/vim-easymotion.git')
call minpac#add('https://github.com/airblade/vim-rooter.git')
diff --git a/.vim/after/plugin/mucomplete.vim b/.vim/after/plugin/mucomplete.vim
index 81751ba..5a756f4 100644
--- a/.vim/after/plugin/mucomplete.vim
+++ b/.vim/after/plugin/mucomplete.vim
@@ -2,6 +2,8 @@ if has('nvim')
finish
endif
+finish " Try using deoplete
+
let g:mucomplete#enable_auto_at_startup = 1
let g:mucomplete#minimum_prefix_length = 1
let g:mucomplete#empty_text_auto = 1