ruff/docs/editors
Zanie Blue 9cdac2d6fb
Add support for using uv as an alternative formatter backend (#19665)
This adds a new `backend: internal | uv` option to the LSP
`FormatOptions` allowing users to perform document and range formatting
operations though uv. The idea here is to prototype a solution for users
to transition to a `uv format` command without encountering version
mismatches (and consequently, formatting differences) between the LSP's
version of `ruff` and uv's version of `ruff`.

The primarily alternative to this would be to use uv to discover the
`ruff` version used to start the LSP in the first place. However, this
would increase the scope of a minimal `uv format` command beyond "run a
formatter", and raise larger questions about how uv should be used to
coordinate toolchain discovery. I think those are good things to
explore, but I'm hesitant to let them block a `uv format`
implementation. Another downside of using uv to discover `ruff`, is that
it needs to be implemented _outside_ the LSP; e.g., we'd need to change
the instructions on how to run the LSP and implement it in each editor
integration, like the VS Code plugin.

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2025-09-09 20:39:53 +05:30
..
features.md Update dependency mdformat-mkdocs to v4 (#15011) 2024-12-16 22:48:37 +05:30
index.md Update dependency mdformat-mkdocs to v4 (#15011) 2024-12-16 22:48:37 +05:30
migration.md Update migration guide with the new ruff.configuration (#16567) 2025-03-10 11:50:06 +00:00
settings.md Add support for using uv as an alternative formatter backend (#19665) 2025-09-09 20:39:53 +05:30
setup.md Update editor setup docs about Neovim and Vim (#18324) 2025-06-03 07:40:22 +00:00