-
-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lsp): unify code actions capabilities
The `biome` language server sends to a client specific code actions that the client can use later to send code actions: - `quickfix.biome` - `source.fixAll.biome` - `source.organizeImports.biome` But under the hood the language server accepts not announced code actions such as `quickfix.suppressRule` or `quickfix.suppressRule.biome.suspicious.noDoubleEquals`. Such code actions work in clients that do not rely on code actions capabilities sent before, VSCode for example. The LSP specification (^1) specifies that clients should not send unsupported requests (code actions). This pull request unified code actions and their announcements by applying the following changes: 1. Custom sub-categories like, e.g. `quickfix.*.suspicious.noDoubleEquals` are removed because they are dynamic and announcing them could be hard to maintain. Instead only the base category is used: `quickfix.suppressRule.biome.suspicious.noDoubleEquals` becomes `quickfix.suppressRule.biome`. The code action data already has all required information to handle it on the server side. 2. Adds additional code actions to the list of `code_action_kinds` capabilities. References: 1. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionKind
- Loading branch information
Showing
4 changed files
with
15 additions
and
31 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