forked from astral-sh/ruff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruff server
now supports commands for auto-fixing, organizing impor…
…ts, and formatting (astral-sh#10654) ## Summary This builds off of the work in astral-sh#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 https://github.com/astral-sh/ruff/assets/19577865/7932e30f-d944-4e35-b828-1d81aa56c087
- Loading branch information
1 parent
2d80f36
commit 119530e
Showing
13 changed files
with
378 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.