mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00

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>
57 lines
1.5 KiB
TOML
57 lines
1.5 KiB
TOML
[package]
|
|
name = "ruff_server"
|
|
version = "0.2.2"
|
|
publish = false
|
|
authors = { workspace = true }
|
|
edition = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
homepage = { workspace = true }
|
|
documentation = { workspace = true }
|
|
repository = { workspace = true }
|
|
license = { workspace = true }
|
|
|
|
[lib]
|
|
|
|
[dependencies]
|
|
ruff_db = { workspace = true }
|
|
ruff_diagnostics = { workspace = true }
|
|
ruff_formatter = { workspace = true }
|
|
ruff_linter = { workspace = true }
|
|
ruff_notebook = { workspace = true }
|
|
ruff_python_ast = { workspace = true }
|
|
ruff_python_codegen = { workspace = true }
|
|
ruff_python_formatter = { workspace = true }
|
|
ruff_python_index = { workspace = true }
|
|
ruff_python_parser = { workspace = true }
|
|
ruff_source_file = { workspace = true }
|
|
ruff_text_size = { workspace = true }
|
|
ruff_workspace = { workspace = true }
|
|
|
|
anyhow = { workspace = true }
|
|
crossbeam = { workspace = true }
|
|
ignore = { workspace = true }
|
|
jod-thread = { workspace = true }
|
|
lsp-server = { workspace = true }
|
|
lsp-types = { workspace = true }
|
|
regex = { workspace = true }
|
|
rustc-hash = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
shellexpand = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
toml = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-log = { workspace = true }
|
|
tracing-subscriber = { workspace = true, features = ["chrono"] }
|
|
|
|
[dev-dependencies]
|
|
insta = { workspace = true }
|
|
|
|
[target.'cfg(target_vendor = "apple")'.dependencies]
|
|
libc = { workspace = true }
|
|
|
|
[features]
|
|
test-uv = []
|
|
|
|
[lints]
|
|
workspace = true
|