From e324531cefff20d2310f25be6d8cae82fb053554 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Tue, 27 Sep 2022 09:26:41 +0800 Subject: Share lsp server between vim-lsp and ale --- .vim/after/plugin/ale.vim | 2 +- .vim/after/plugin/lsp.vim | 4 ++++ .vim/after/plugin/minpac.vim | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.vim/after/plugin/ale.vim b/.vim/after/plugin/ale.vim index 2f616cd..2bdd541 100644 --- a/.vim/after/plugin/ale.vim +++ b/.vim/after/plugin/ale.vim @@ -9,7 +9,7 @@ let g:ale_virtualtext_cursor = 1 let g:ale_linters = { \ 'c': ['clangd', 'cc', 'ccls'], - \ 'go': ['gopls'], + \ 'go': [], \ } nmap [g (ale_previous_wrap) diff --git a/.vim/after/plugin/lsp.vim b/.vim/after/plugin/lsp.vim index ae5f203..1aaee35 100644 --- a/.vim/after/plugin/lsp.vim +++ b/.vim/after/plugin/lsp.vim @@ -8,6 +8,10 @@ packadd vim-lsp packadd vim-lsp-snippets packadd vim-lsp-ultisnips +" This package will help enable diagnostic config of vim-lsp and then it +" can help send the result to ALE. Pay attention of the loading order. +packadd vim-lsp-ale + if executable('pylsp') au User lsp_setup call lsp#register_server({ \ 'name': 'pylsp', diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim index 5a227b7..4adf566 100644 --- a/.vim/after/plugin/minpac.vim +++ b/.vim/after/plugin/minpac.vim @@ -27,6 +27,7 @@ function! InitMinpac() abort 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/rhysd/vim-lsp-ale.git', {'type': 'opt'}) call minpac#add('https://github.com/andymass/vim-matchup.git', {'type': 'start'}) -- cgit v1.2.3