From 922493699a466cc00a028f264e8ade163957f82d Mon Sep 17 00:00:00 2001 From: Bradley Small <vc.Bradley.Small@lowes.com> Date: Wed, 13 Nov 2019 15:31:45 -0500 Subject: [PATCH] adding vim-lsp language server plugin --- .vim/ftplugin/python.vim | 3 ++- .vimrc | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim index 3dc65df..281a8f6 100644 --- a/.vim/ftplugin/python.vim +++ b/.vim/ftplugin/python.vim @@ -51,7 +51,8 @@ let b:ropevim_prefer_py3=1 let python_highlight_all=1 " " Check Python files with flake8 and pylint. -let b:ale_linters = ['pyls', 'flake8', 'pylint', 'bandit', 'mypy', 'prospector', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylama', 'pyre', 'vulture'] +let b:ale_linters = ['pyls'] +" , 'flake8', 'pylint', 'bandit', 'mypy', 'prospector', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylama', 'pyre', 'vulture'] " Fix Python files black. let b:ale_fixers = ['black', 'isort', 'remove_trailing_lines', 'reorder-python-imports', 'trim_whitespace', 'add_blank_lines_for_python_control_statements'] diff --git a/.vimrc b/.vimrc index a43af2f..8b9725b 100644 --- a/.vimrc +++ b/.vimrc @@ -17,8 +17,20 @@ Plug 'jpalardy/vim-slime' Plug 'tpope/vim-surround' Plug 'tpope/vim-vividchalk' Plug 'vimwiki/vimwiki' +Plug 'prabirshrestha/async.vim' +Plug 'prabirshrestha/vim-lsp' " call plug#end() + +if executable('pyls') + au User lsp_setup call lsp#register_server({ + \ 'name': 'pyls', + \ 'cmd': {server_info->['pyls']}, + \ 'whitelist': ['python'], + \ }) +endif + + " }}} " Configuration settings ------------------{{{ -- GitLab