workspace/symbol support for python-lsp-server via Jedi
Project description
pylsp-workspace-symbols
A python-lsp-server plugin that adds workspace/symbol support via Jedi.
Why?
pylspdoes not implementworkspace/symbolnatively. This plugin fills that gap, enabling "Go to Symbol in Workspace" in any LSP client — including CudaText, Neovim, Emacs, and others.
✨ Features
- 🔍 Workspace-wide symbol search — find functions, classes, and modules across all files in the project
- ⚡ Fast — results in ~130ms after the first call (Jedi cache warm)
- 🔤 Case-insensitive substring match —
areafindscalculate_area,CalfindsCalculator - 📁 Smart folder exclusion — automatically skips
.git,__pycache__,node_modules,.venv,dist,build, and more - ⚙️ Configurable — tune
max_symbolsandignore_foldersvia pylsp settings - 🐍 Python 3.8+ — compatible with all modern Python versions
📦 Installation
pip install pylsp-workspace-symbols
The plugin is discovered automatically by pylsp via its entry point — no manual configuration needed.
⚙️ Configuration
Add to your LSP client's pylsp settings (e.g. in settings.json or equivalent):
{
"pylsp": {
"plugins": {
"jedi_workspace_symbols": {
"enabled": true,
"max_symbols": 500,
"ignore_folders": []
}
}
}
}
| Option | Type | Default | Description |
|---|---|---|---|
enabled |
bool | true |
Enable/disable the plugin |
max_symbols |
int | 500 |
Maximum symbols returned. 0 means no limit |
ignore_folders |
list | [] |
Extra folder names to skip (merged with built-in list) |
Built-in ignored folders
.git, .hg, .svn, __pycache__, .mypy_cache, .ruff_cache, .pytest_cache,
node_modules, .venv, venv, .env, env, dist, build, .eggs, egg-info
🚀 Usage
Once installed, your LSP client will receive workspaceSymbolProvider: true in the server capabilities.
Use your client's "Go to Symbol in Workspace" command (typically Ctrl+T or # in the symbol picker).
How it works
pylsp does not define a pylsp_workspace_symbols hookspec, so this plugin uses two hooks:
pylsp_experimental_capabilities— advertisesworkspaceSymbolProvider: trueto the client during theinitializehandshake.pylsp_dispatchers— registers a custom JSON-RPC handler forworkspace/symbolthat calls Jedi'sproject.complete_search("")and filters results client-side by case-insensitive substring match.
Note:
workspace/symbolreturns module-level definitions (functions, classes, modules). Local variables inside functions are not indexed — this is standard LSP behaviour, consistent with pyright and other Python language servers.
🧪 Tests
pip install -e ".[dev]"
pytest
🤝 Contributing
Issues and pull requests are welcome! Please open an issue before submitting a large change.
📚 References
👤 Author
Bruno Eduardo — github.com/Hanatarou
📄 License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylsp_workspace_symbols-0.1.0.tar.gz.
File metadata
- Download URL: pylsp_workspace_symbols-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2a9786ad22734351513a9d258bac88bcbd5453eea018f10996fd32a608d6e16
|
|
| MD5 |
2d31c3f10484a4be1f67d325ff3e977e
|
|
| BLAKE2b-256 |
edeab9f100d8e6626e06f0a059d8ff11e528b02846ce6badac4baf7b7f18a0e4
|
Provenance
The following attestation bundles were made for pylsp_workspace_symbols-0.1.0.tar.gz:
Publisher:
publish.yml on Hanatarou/pylsp-workspace-symbols
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylsp_workspace_symbols-0.1.0.tar.gz -
Subject digest:
e2a9786ad22734351513a9d258bac88bcbd5453eea018f10996fd32a608d6e16 - Sigstore transparency entry: 972355933
- Sigstore integration time:
-
Permalink:
Hanatarou/pylsp-workspace-symbols@c99117f12b2abfa2e3d99bd842a175de53d69a82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Hanatarou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c99117f12b2abfa2e3d99bd842a175de53d69a82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylsp_workspace_symbols-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pylsp_workspace_symbols-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19afdd72982b8e2fb17435bc3a19fde0cdc7a646d9cc7ecf738220a7f8cc0ad0
|
|
| MD5 |
fde3b74172ff2be1f6cdce1d437a888a
|
|
| BLAKE2b-256 |
69aae276089e4fb6dfb1f3cac0ec32d771b4e9e5f19e3df98e1ba86c59eaf045
|
Provenance
The following attestation bundles were made for pylsp_workspace_symbols-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Hanatarou/pylsp-workspace-symbols
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylsp_workspace_symbols-0.1.0-py3-none-any.whl -
Subject digest:
19afdd72982b8e2fb17435bc3a19fde0cdc7a646d9cc7ecf738220a7f8cc0ad0 - Sigstore transparency entry: 972356167
- Sigstore integration time:
-
Permalink:
Hanatarou/pylsp-workspace-symbols@c99117f12b2abfa2e3d99bd842a175de53d69a82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Hanatarou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c99117f12b2abfa2e3d99bd842a175de53d69a82 -
Trigger Event:
push
-
Statement type: