microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.26k stars 29.3k forks source link

Allow interception of Completion list and its transformation #224374

Closed jkavalec closed 2 weeks ago

jkavalec commented 3 months ago

Ability to modify a Completion list right before it is rendered seems like missed opportunity, that would allow Plugin dev to change way completions are displayed to the user, this can be done in IntelliJ IDEs rather easily, and would be great if it was possible for VS-Code

I searched the whether it is possible similarly to IntelliJ IDEs to intercept the list of completions, inspect them and then modify the final list the way you like before it gets rendered.

There could be two approaches

jrieken commented 3 months ago

same as IntelliJ - have CompletionItemProvider receive 'Completion list so far' and allow it to be inspected/manipulated right there

We run them (mostly) in parallel and therefore a "list so far" approach doesn't work

have a dedicated CompletionInterceptor that gets the list before it is rendered, so transformation is possible before rendering

Unsure about that because it enables an extension to "break" another extension (by bugs) and that's something we aren't aiming for.

jkavalec commented 3 months ago

First is understandable.

Second - I don't thin processing/filtering result is breaking something, this would affect the output the way user wishes, and add some flexibility, autocompletion is the part you see all the time, and it would certainly open options to make it more convenient.

Another option would be to have 'interceptable completion action' standing separately that would allow such modification, and you could use it if you like.

vs-code-engineering[bot] commented 2 months ago

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!

vs-code-engineering[bot] commented 3 weeks ago

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!

vs-code-engineering[bot] commented 2 weeks ago

:slightly_frowning_face: 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!