8000 GitHub - python-lsp/python-lsp-server at ngates/auto-import
[go: up one dir, main page]

Skip to content

Fork of the python-language-server project, maintained by the Spyder IDE team and the community

License

Notifications You must be signed in to change notification settings

python-lsp/python-lsp-server

 
 

Repository files navigation

Python Language Server

https://circleci.com/gh/palantir/python-language-server.svg?style=shield https://ci.appveyor.com/api/projects/status/mdacv6fnif7wonl0?svg=true

A Python 2.7 and 3.4+ implementation of the Language Server Protocol making use of Jedi, pycodestyle, Pyflakes and YAPF.

Plugins

Installing these plugins will add extra functionality to the language server:

Features

Auto Completion:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/auto-complete.gif

Code Linting with pycodestyle and pyflakes:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/linting.gif

Signature Help:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/signature-help.gif

Go to definition:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/goto-definition.gif

Hover:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/hover.gif

Find References:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/references.gif

Document Symbols:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/document-symbols.gif

Document Formatting:

https://raw.githubusercontent.com/palantir/python-language-server/develop/resources/document-format.gif

Installation

pip install python-language-server

Development

To run the test suite:

pip install .[test] && tox

Develop against VS Code

The Python language server can be developed against a local instance of Visual Studio Code.

  1. Install VSCode for Mac
  2. From within VSCode View -> Command Palette, then type shell and run install 'code' command in PATH
# Setup a virtual env
virtualenv env
. env/bin/activate

# Install pyls
pip install .

# Install the vscode-client extension
cd vscode-client
npm install .

# Run VSCode which is configured to use pyls
# See the bottom of vscode-client/src/extension.ts for info
npm run vscode -- $PWD/../

Then to debug, click View -> Output and in the dropdown will be pyls. To refresh VSCode, press Cmd + r

License

This project is made available under the MIT License.

0