You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 27, 2019. It is now read-only.
This is a language server for Python that adheres to the Language Server Protocol (LSP). It uses Jedi to perform source code analysis. Python versions 2.x and 3.x are supported.
Automatic Dependency Installation
Configuring pip
python-langserver uses pip to fetch dependencies. To configure the behavior of pip, you can supply the pipArgsinitalizationOption field inside the initalize request parameters. pipArgs specifies a list of arguments to add to the invocation of pip, for example:
This will tell pip to use https://python.example.com as its base package index and https://pypi.python.org/simple as an extra package index, as described in
the pip documentation.
Note, when using this language server with Sourcegraph - you can set the initializationOptions in your site configuration:
The language server will not run setup.py or pip install. When it encounters an import, it tries to infer the package name and run pip download. (This also avoids running the downloaded package's setup.py.) This is expected to work as long as the name of the package on PyPI (or your private package index) is the same as the name that's imported in the source code.
Development
Getting started
You'll need Python version 3.6 or greater or pyenv installed. You will also need pipenv installed:
pipenv install
pipenv run python python-langserver.py --mode=tcp --addr=2087