Stream: t-compiler/rust-analyzer

Topic: Auto imports in VSCode


eryn (Sep 15 2020 at 23:55, on Zulip):

with rust-analyzer, import prompts are surfaced with the "quick fix" menu: image.png

In other languages, this is surfaced in the auto complete image.png and as a "preferred quick fix" on the side indicated with the blue light bulb.

I would really prefer it if you were able to auto import things with the auto complete menu instead of with the quick fix, because it's different than all the other languages I use and it uses a different keyboard shortcut in VS Code

Jonas Schievink [he/him] (Sep 15 2020 at 23:58, on Zulip):

This might not even be terribly difficult to implement nowadays :)

Jeremy Kolb (Sep 16 2020 at 13:18, on Zulip):

Yeah! If you look at https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#textDocument_completion additionalTextEditscan be specified and indeed the comment is:

Jeremy Kolb (Sep 16 2020 at 13:20, on Zulip):

In 3.16 resolve support was added to delay that computation as a performance enhancement

Last update: Jul 28 2021 at 04:45UTC