microsoft / vscode

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

Improve snippets autocomplete-display snippets from memory before all autocomplete providers finish #113334

Closed capaj closed 3 years ago

capaj commented 3 years ago

image

I have slightly bigger TS project. About 350k LOC. It is ok that TS is a little slower. What is not ok to have to wait like 15 seconds just to be able to use a snippet. In the screenshot you can see I just wanted to expand my snippet, yet it still took vscode unacceptable amount of time to let me do that because it was trying to come up with all those TS powered suggestions. I would like the list to render twice. So the autcomplete list when invoked would:

  1. Instantly show all my snippets from memory
  2. when all autocomplete providers finish running, rerender again with the complete list now.

Users might suffer from the list changing while they browse it, so to mitigate that I would propose the list keeps position of items until the selected item. So If I use my arrow keys to select the 4th item, on the second render it would populate the suggestions from 5th item onward keeping the list unchanged for the suggestions I already went through.

WDYT? Probably best make this behavior optional as many people might be used to the current behavior where it always waits for all autocomplete suggestions to load up.

I'd love to try and open a PR for this, if it would be acceptable for maintainers.

jrieken commented 3 years ago

https://github.com/microsoft/vscode/issues/107343