Jedi Language Server
Jedi Language Server (version 0.46.0) is an active Python Language Server that wraps the powerful Jedi library to provide code intelligence features such as auto-completion, goto definition, hover, and refactoring capabilities. It supports various editors and IDEs through the Language Server Protocol (LSP), including integrations for computational notebooks. The project sees regular updates, often with monthly or bi-monthly releases.
Common errors
-
jedi-language-server crashes right after start with failed import
cause Often due to incompatible or missing dependencies, historically an alpha version of `lsprotocol` being pulled in. Can also be due to corrupted environments.fixUpgrade `jedi-language-server` to the latest version. Use `pipx` for isolated installation. If issues persist, try reinstalling in a fresh virtual environment. (e.g., `pip install --force-reinstall jedi-language-server`) -
jedi-language-server high CPU usage / processes consuming excessive resources
cause Can be triggered by large projects, complex Python environments, or specific editor configurations. In VS Code, it was sometimes related to experimental features.fixIn VS Code, try adding `"python.experiments.optOutFrom": ["pythonJediLSP"]` to your `settings.json` and reload the window. For other editors, ensure your Python environment is clean and that project root settings are correctly configured. -
Jedi LSP: No completion / goto definition / Unable to resolve modules
cause Incorrect LSP workspace root in the editor, missing `extraPaths` configuration, or issues with environment detection (e.g., when using Conda, Homebrew, or non-standard Python installations).fixVerify that your editor's LSP client is configured with the correct workspace root. If you have custom module paths, configure `jediSettings.extraPaths` in your editor's LSP settings (e.g., `coc-settings.json` for coc.nvim). Ensure `jedi-language-server` is installed in the Python environment active for your project. -
FileNotFoundError: /1 during codeAction on inmemory:// URIs
cause Reported issue related to incorrect path handling by Jedi during refactoring operations on in-memory files, particularly in older versions.fixUpgrade `jedi-language-server` to the latest version to benefit from bug fixes. If working with in-memory buffers or non-file-system paths, ensure editor integration is robust and passing correct URI schemes.
Warnings
- breaking Support for Python 3.8 was officially dropped in version 0.43.0. Users on Python 3.8 or older will need to upgrade their Python interpreter or downgrade the `jedi-language-server` version.
- gotcha Semantic Tokens support, added in v0.45.0, was quickly found to be broken and disabled by default in v0.45.1. While subsequent versions may have re-enabled or fixed this, users experiencing issues with semantic highlighting should check for explicit fixes or configuration options.
- gotcha The project's GitHub README indicates 'MAINTENANCE MODE' and suggests new users consider 'Zuban' (a Mypy-Compatible Python Language Server Built in Rust) as a successor. While `jedi-language-server` remains actively maintained with ongoing updates, this may signal a future shift in primary development focus or long-term investment.
- gotcha Jedi Language Server primarily focuses on code intelligence (completion, definition, etc.) and provides only basic syntax error diagnostics. It does not include comprehensive linting or advanced diagnostics provided by tools like Mypy, Pylint, or Ruff by default. Users needing full code quality checks should integrate a separate linter LSP server (e.g., `ruff-lsp` or `python-lsp-server` with extensions).
Install
-
pip install -U jedi-language-server -
pipx install jedi-language-server
Imports
- jedi-language-server
from jedi_language_server import SERVER
$ jedi-language-server
Quickstart
# Run the Jedi Language Server over standard I/O (stdio) jedi-language-server # Or, run it over TCP (common for remote development) # jedi-language-server --tcp --port 2087 # Editors/IDEs typically execute this command automatically upon configuration.