ruff/crates/ruff_server
Darius Carrier 7dad0c471d
Avoid indexing the project if configurationPreference is editorOnly (#16381)
## Summary

Closes: https://github.com/astral-sh/ruff/issues/16267

This change skips building the `index` in RuffSettingsIndex when the
configuration preference, in the editor settings, is set to
`editorOnly`. This is appropriate due to the fact that the indexes will
go unused as long as the configuration preference persists.

## Test Plan

I have tested this in VSCode and can confirm that we skip indexing when
`editorOnly` is set. Upon switching back to `editorFirst` or
`filesystemFirst` we index the settings as normal.

I don't seen any unit tests for setting indexing at the moment, but I am
happy to give it a shot if that is something we want.
2025-02-27 07:46:14 +05:30
..
assets Update documentation for ruff server with new migration guide (#11499) 2024-05-22 14:36:33 -07:00
docs Add docs for Ruff language server (#12344) 2024-07-18 17:41:43 +05:30
resources/test/fixtures Expand ruff.configuration to allow inline config (#16296) 2025-02-26 10:17:11 +05:30
src Avoid indexing the project if configurationPreference is editorOnly (#16381) 2025-02-27 07:46:14 +05:30
tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
Cargo.toml Avoid unnecessary info at non-trace server log level (#16389) 2025-02-26 13:31:17 +05:30
CONTRIBUTING.md High-level project overview and contributing guide for ruff server (#10565) 2024-03-25 23:08:37 -07:00
README.md Add docs for Ruff language server (#12344) 2024-07-18 17:41:43 +05:30

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.