-
Notifications
You must be signed in to change notification settings - Fork 306
Servers Python
Ryan Olson edited this page Feb 19, 2021
·
7 revisions
A Python 2.7 and 3.4+ implementation of the Language Server Protocol.
pip install python-language-server
Once the python-language-server
is installed, you can register the python-language-server
in your .vimrc
if executable('pyls')
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python'],
\ })
endif
python-language-server
has several settings that can be tweaked through the workspace configuration. For example, enabling pydocstyle
(which is disabled by default):
if executable('pyls')
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python'],
\ 'workspace_config': {'pyls': {'plugins': {'pydocstyle': {'enabled': v:true}}}}
\ })
endif
The full set of options that can be manipulated can be found in package.json.