ruff/crates/ruff_server/src/server
Jane Lewis c11e6d709c
ruff server now supports commands for auto-fixing, organizing imports, and formatting (#10654)
## Summary

This builds off of the work in
https://github.com/astral-sh/ruff/pull/10652 to implement a command
executor, backwards compatible with the commands from the previous LSP
(`ruff.applyAutofix`, `ruff.applyFormat` and
`ruff.applyOrganizeImports`).

This involved a lot of refactoring and tweaks to the code action
resolution code - the most notable change is that workspace edits are
specified in a slightly different way, using the more general `changes`
field instead of the `document_changes` field (which isn't supported on
all LSP clients). Additionally, the API for synchronous request handlers
has been updated to include access to the `Requester`, which we use to
send a `workspace/applyEdit` request to the client.

## Test Plan



7932e30f-d944-4e35-b828-1d81aa56c087
2024-04-05 23:27:35 +00:00
..
api ruff server now supports commands for auto-fixing, organizing imports, and formatting (#10654) 2024-04-05 23:27:35 +00:00
schedule ruff server now supports commands for auto-fixing, organizing imports, and formatting (#10654) 2024-04-05 23:27:35 +00:00
api.rs ruff server now supports commands for auto-fixing, organizing imports, and formatting (#10654) 2024-04-05 23:27:35 +00:00
client.rs Client request sender and inbound response handling for ruff server (#10620) 2024-03-26 13:53:56 -07:00
schedule.rs ruff server now supports commands for auto-fixing, organizing imports, and formatting (#10654) 2024-04-05 23:27:35 +00:00