Skip to content
Ryan Olson edited this page May 10, 2018 · 7 revisions

A Python 2.7 and 3.4+ implementation of the Language Server Protocol.

Installing server

pip install python-language-server

Once the python-language-server is installed, you can either:

  1. Install vim-lsp-python OR
  2. Register the python-language-server yourself in your .vimrc

Installing vim-lsp-python

If you'd like the vim-lsp-python plugin to manage registering the python-language-server, you can install the plugin using vim-plug:

" After vim-lsp, etc
Plug 'ryanolsonx/vim-lsp-python'

Registering in .vimrc

if executable('pyls')
    au User lsp_setup call lsp#register_server({
        \ 'name': 'pyls',
        \ 'cmd': {server_info->['pyls']},
        \ 'whitelist': ['python'],
        \ })
endif