Skip to content

Add functions to operate on code actions based on their kind #2656

@michaelpj

Description

@michaelpj

Code actions have kinds. It seems like there's a fair bit of scope for the client to do things with code actions of a particular kind. Thoughts that occur to me:

  • Apply all actions of a particular kind in a buffer/region (haskell-language-server implements a custom "Apply all hints" action that's effectively "apply all actions of kind quickfix" - we should be able to do that generically, and handle regions etc.)
  • Get all actions of a particular kind and present the user with a selection menu using a custom prompt (Add interactive command for case splitting lsp-haskell#112 is essentially this)

Clients might want to implement custom functions on top of this that have meanings for particular code actions kinds that are unique to their servers, but it would be handy to have the building blocks in lsp-mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions