Skip to main content

Python Language Server for the Language Server Protocol

Project description

Python Language Server

https://circleci.com/gh/palantir/python-language-server.svg?style=shield https://img.shields.io/github/license/palantir/python-language-server.svg

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

Features

Auto Completion:

resources/auto-complete.gif

Code Linting with pycodestyle and pyflakes:

resources/linting.gif

Signature Help:

resources/signature-help.gif

Go to definition:

resources/goto-definition.gif

Hover:

resources/hover.gif

Find References:

resources/references.gif

Document Symbols:

resources/document-symbols.gif

Document Formatting:

resources/document-format.gif

Installation

pip install --process-dependency-links .

Development

To run the test suite:

pip install --process-dependency-links .[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](http://code.visualstudio.com/docs/?dv=osx)

  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.

Project details


Release history Release notifications | RSS feed

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page