You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filter code actions by prefix, not equality (#3071)
It's quite unclear in the spec, but the idea seems to generally be to
filter code actions by their kinds *hierarchically*, so if the user asks
for `refactor` actions, the server can return `refactor.inline` actions.
This is usually what you want: for example, HLS has a variety of
import-fixing actions which use sub-kinds of `quickfix.import`. These
can be requested by just asking for the kind `quickfix.import`, which is
very nice.
However, in `lsp-mode` we then filter these down to those that match
*exactly*. I think we should also do a prefix match.
(My end goal is to be able to do `(lsp-make-interactive-code-action
haskell-fix-imports "quickfix.import")` and have it actually select all
the import-fixing actions and let the user pick one!)
I don't think this will affect any existing users much. Since it
currently doesn't work if you pass a kind expecting actions with
sub-kinds, presumably current users are only passing maximally-specific
kinds, and won't see any different behaviour.
0 commit comments