Skip to content

Allow sort order of code actions from multiple providers to be influenced #62267

@DanTup

Description

@DanTup

I have multiple code action providers and have been unable to sort them as I'd like (eg. one provider is low priority and should always come last).

I found this code:

https://github.com/Microsoft/vscode/blob/243168d450cac7b641ad33a3fc54171aa7c6a83c/src/vs/editor/contrib/quickFix/quickFix.ts#L43

Which suggests that the messages from the associated diagnostics are used - however I tried messing with these and it didn't seem to make any difference (it also seems weird to use the text message of the associated diagnostic which is not visible on the screen to sort with).

Is it possible to add some sort of rank to code actions to allow sorting from multiple providers to be influenced (or at least, the sorting rules documented).

(cc @mjbvz)

Metadata

Metadata

Assignees

Labels

*out-of-scopePosted issue is not in scope of VS Codeapieditor-code-actionsEditor inplace actions (Ctrl + .)editor-contribEditor collection of extrasfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions