Thanks for your interest in improving sage-lsp.
Tip
Install in a sage-enabled environment
git clone https://github.com/SeanDictionary/sage-lsp.git && cd sage-lsp
pip install -e .Warning
All tests will successfully run without any Error. They are only used to simulate a simple LSP client and check the results.
pytest test/Useful commands: exp.
pytest tests/test_completion.py
pytest tests/test_hover.py -k basic
pytest -s -v --tb=shortFor more LSP test details, see tests/README.md.
.
βββ CHANGELOG.md
βββ CONTRIBUTING.md
βββ LICENSE
βββ README.md
βββ pyproject.toml
βββ src
β βββ sagelsp
β βββ config style/config helpers
β βββ plugins plugin implementations (lint, format, hover, completion, etc.)
β βββ __init__.py
β βββ __main__.py
β βββ _version.py
β βββ server.py LSP feature registration and request handlers
β βββ symbols_cache.py local cache for Sage symbols and import paths
βββ tests end-to-end style LSP tests and utilities
Please keep PRs focused and small when possible.
Before opening a PR:
- Ensure tests pass locally.
- Update docs if behavior changed (
README.md, this file, or test docs). - Add an entry under
UnreleasedinCHANGELOG.md. - Include a short summary of what changed and why.
- Keep plugin behavior resilient: failed plugin hooks should not crash the whole server.
- Prefer minimal, targeted changes over broad refactors.
- When changing LSP behavior, add or update tests in
tests/.
When filing an issue, include:
- SageMath version (
sagelsp --sageoutput if possible) - Python version
- Editor and LSP client configuration
- Minimal reproducible code sample