Skip to content

Extend CodeActionProvider to by queryable for all possibly actions to aid keybinding #45383

Closed

Description

@DanTup

We now have the ability for users to key-bind groups of quick-fixes, but there's no way for them to know what the IDs are without us documenting them. I've documented them in my readme but the list is long and can actually change depending on the version of the SDK you have.

It'd be great if Code could ask a provider for all of their actions (returning a nice display name, and the CodeActionKind) and then aid the user in binding them, so the list was always up to date.

Activity

  1. jrieken commented on Mar 9, 2018

    @jrieken
    Contributor

    Easier said than done because some language servers themselves are dynamic (think of TypeScript server plugins) That's why we define certain prefixes which should be extended...

  2. added
    editor-code-actions
    on Mar 9, 2018
  3. DanTup commented on Mar 9, 2018

    @DanTup
    ContributorAuthor

    The same is true for Dart, but my plan if you'd do this is to request the server can provide me with its "full list" (they exist inside the server).

    It's not a big deal, but as a Code user I'd much rather have auto-completion or something than have to go looking up external docs (there's no way to discover the IDs from seeing the refactor inside of the editor).

    Another option is for Code to cache them as it seems them (maybe just for the session?) so the user can at least find the IDs of the ones they've seen. This might feel a bit weird though since it's not clear to the user why they only see a subset.

  4. mjbvz commented on Jul 19, 2018

    @mjbvz
    Contributor

    I believe this was partially addressed by #47702

    Intellisense for codeActionsOnSave is tracked by #52846. The other place we could consider adding intellisense is for keybindings. As Johannes Rieken (@jrieken) notes though, this gets tricky if you want to setup a keybinding for an extension that has not yet been activated. We likely would want a new contribution point in the package.json for that

  5. added
    feature-request
    on Jul 27, 2018
  6. added
    *out-of-scope
    on Oct 7, 2019
  7. vscodebot commented on Oct 7, 2019

    @vscodebot

    This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

    If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

    Thanks for your understanding and happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*out-of-scopeapieditor-code-actionsfeature-request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions