ruff/docs
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
..
.overrides Use | for page separator in meta titles (#13221) 2024-09-03 00:46:15 +00:00
assets Point docs to Astral favicon (#13219) 2024-09-02 20:11:39 -04:00
editors Add support for using uv as an alternative formatter backend (#19665) 2025-09-09 20:39:53 +05:30
formatter Update black deviations (#15928) 2025-02-04 14:04:24 +00:00
js Improvements to documentation (#12712) 2024-08-12 07:17:32 +00:00
stylesheets Fix copy and line separator colors in dark mode (#19630) 2025-07-30 15:08:31 +01:00
.gitignore Add docs for Ruff language server (#12344) 2024-07-18 17:41:43 +05:30
configuration.md Fix description of global config file discovery strategy (#19143) (#19188) 2025-08-17 18:35:37 -05:00
faq.md Fix incorrect D413 links in docstrings convention FAQ (#20089) 2025-08-26 10:24:58 +05:30
formatter.md [docs] fix formatting of "See Style Guide" link (#17272) 2025-04-07 12:43:26 +00:00
installation.md Use uv consistently throughout the documentation (#15302) 2025-01-07 14:43:25 +00:00
integrations.md Bump 0.12.12 (#20242) 2025-09-04 11:35:56 -05:00
linter.md Add new noqa specification to the docs (#16703) 2025-03-13 12:48:53 -04:00
preview.md Fix minor punctuation errors (#16228) 2025-02-18 12:24:57 +00:00
requirements-insiders.txt Update dependency ruff to v0.12.12 (#20293) 2025-09-08 11:03:19 +05:30
requirements.txt Update dependency ruff to v0.12.12 (#20293) 2025-09-08 11:03:19 +05:30
tutorial.md Bump 0.12.12 (#20242) 2025-09-04 11:35:56 -05:00
versioning.md document MSRV policy (#16384) 2025-02-26 07:09:23 -08:00