-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter code actions based on prefix, not equality
It's quite unclear in the spec, but in microsoft/language-server-protocol#970 it's suggested that the intention is that the kinds given in `only` should be used as *prefix* filters of the generated code action kinds. That is to say, if the client asks for `only = [ CodeActionRefactor ]`, we should give them all kinds of refactoring code actions, including those whose kind is `CodeActionRefactorInline` (because as "hierarchical strings" they are represented as `"refactor"` and `"refactor.inline"`). This is quite important for the client: e.g. I hit this because I wanted to ask for all the import quickfixes so I could present them to the user to pick one. But they use various subkinds of `"quickfix.import"`, so currently you cannot ask for them all (asking for `"quickfix.import"` currentl returns nothing!). The ipmlemention is a little ugly: this needs some helper funcitons in `lsp`, which I'll make a PR for separately, but I didn't want to block this.
- Loading branch information
Showing
2 changed files
with
20 additions
and
13 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