mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:50:38 +00:00
![]() ## Summary I noticed this while trying out https://github.com/astral-sh/ruff-vscode/issues/665 that we use the `Display` implementation to show the error which hides the context. This PR changes it to use the `Debug` implementation and adds the message as a context. ## Test Plan **Before:** ``` 0.001228084s ERROR main ruff_server::session::index::ruff_settings: Unable to find editor-specified configuration file: Failed to parse /private/tmp/hatch-test/ruff.toml ``` **After:** ``` 0.002348750s ERROR main ruff_server::session::index::ruff_settings: Unable to load editor-specified configuration file Caused by: 0: Failed to parse /private/tmp/hatch-test/ruff.toml 1: TOML parse error at line 2, column 18 | 2 | extend-select = ["ASYNC101"] | ^^^^^^^^^^ Unknown rule selector: `ASYNC101` ``` |
||
---|---|---|
.. | ||
assets | ||
docs | ||
resources/test/fixtures | ||
src | ||
tests | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
README.md |
The Ruff Language Server
ruff server
is a language server that powers Ruff's editor integrations.
The job of the language server is to listen for requests from the client (in this case, the code editor of your choice) and call into Ruff's linter and formatter crates to construct real-time diagnostics or formatted code, which is then sent back to the client. It also tracks configuration files in your editor's workspace, and will refresh its in-memory configuration whenever those files are modified.
Refer to the documentation for more information on how to set up the language server with your editor and configure it to your liking.
Contributing
Contributions are welcome and highly appreciated. To get started, check out the contributing guidelines.
You can also join us on Discord.