microsoft/vscode

[Feature Request] Allow sort order of code actions from multiple providers

jdneo opened this issue · 6 comments

jdneo commented

Related with #62267

When multiple code action providers contribute code actions, I hope there can be a way that allow me to make the code actions appear at lower places or at last.

My case is that, the providers come from different extensions. And all the code actions have not set isPreferred and diagnostics.

In that case, according to

private static _compareByScoreAndTime(a: Entry<any>, b: Entry<any>): number {

I can easily make the results of the provider come first (e.g. postpone the code action provider registration), but so far I didn't find an easy way to make the results come last.

What order do you suggest?

jdneo commented

I hope there can be a way to allow extension declares the code actions appear at the bottom (or with low priority).

Sounds wired, but in our case, we have code actions that we do not want it to appear at top positions in the list.

We don't like "absolute" priorities like numbers - since everyone will just use the highest/lowest number. It would need something more relative, similar sortText

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!