Copyright © 2020– Spyder Project Contributors
Spyder extensions for the python-lsp-server (pylsp). This package provides Spyder-specific extras for the Language Server Protocol (LSP) on Python, such as document symbol searching and others.
To install pyls-spyder, you can use both conda or pip package managers:
# Using conda (Recommended)
conda install pyls-spyder -c spyder-ide
# Using pip
pip install pyls-spyder
This package depends on the python-lsp-server to integrate the Spyder-specific extensions.
To install and develop spyder-pyls locally, you will need to install the python-lsp-server:
# Using conda
conda install python-lsp-server
# Using pip
pip install python-lsp-server
Then, you can install the package locally using pip:
pip install -U -e .
We use pytest to run tests as it follows:
pytest -x -v pyls_spyder/tests
LSP method | Spyder extensions |
---|---|
textDocument/documentSymbol |
Find code cells # %% and block comments # -- |
textDocument/foldingRange |
Return code cells # %% as code folding regions |
This plugin can be configured by using the key pyls_spyder
when calling workspace/didChangeConfiguration
on the pyls. Each configuration option is described below:
LSP method | Configuration Key | Type | Description |
---|---|---|---|
textDocument/documentSymbol |
group_cells |
bool |
Enable/Disable code cell grouping according to the total number of leading percentages |
enable_block_comments |
bool |
Enable/disable block comment detection |
Please see our CHANGELOG file to learn more about our new features and improvements.
We follow PEP8 and PEP257 for all Python modules. We use MyPy type annotations for all functions and classes declared on this package. Feel free to send a PR or create an issue if you have any problem/question.