This extension is based on the Template for VS Code Python tools extensions.
- Install
uv - Install
just, or see thejustfilefor corresponding commands. - Create and activate a virtual environment (e.g.,
uv venv && source .venv/bin/activate). - Install development dependencies (
just install). - To automatically format the codebase, run:
just fmt. - To run lint and type checks, run:
just check. - To run tests, run:
just test.
To run the extension, navigate to src/extension.ts and run (F5). You should see the LSP output
and Python log messages in the debug console under "Python Server".
- Clone ruff-lsp to, e.g.,
../ruff-lsp. - In
../ruff-lsp, run:uv pip install -t ../ruff-vscode/bundled/libs/ -e ..
- Clone ruff to, e.g.,
/home/ferris/ruff. - Run
cargo buildin the Ruff repository. - Set "Ruff: Path" to
/home/ferris/ruff/target/debug/ruffin the VS Code settings.
- Make sure you have Python 3.7 installed and locatable by uv.
(If you're using pyenv, you may need to run
pyenv local 3.7.) - Run
uv run --python=3.7 scripts/release.py. (Runuv run --python=3.7 scripts/release.py --helpfor information on what this script does, and its various options.) - Check the changes the script made, copy-edit the changelog, and commit the changes.
- Create a new PR and merge it.
- Create a new Release, enter
x.x.x(wherex.x.xis the new version) into the Choose a tag selector. Click Generate release notes, curate the release notes and publish the release. - The Release workflow publishes the extension to the VS Code marketplace.