2

The quick docs that appear for my autocomplete options are currently bare-bones, without highlighting or a simple description:

enter image description here

Compare to the info when you hover the mouse over this item after completing it:

enter image description here

Even having the simple description like "Creates a text widget." would be very helpful when typing to decide which item is the one I need.

I think this issue may be specific to Flutter, as I do see descriptions for Dart code, and I quickly checked and it seems Golang / Python autocomplete options are getting descriptions.

Even finding what these features are called has been difficult and frustrating, and I haven't been able to find settings that control them.

In addition to hovering your mouse over a completed item I know you can manually invoke this doc popup as seen in this other answer here by doing Ctrl+K+Ctrl+I, however I specifically want an improvement to the description shown while typing.

This question seems similar, though Ctrl+Space just brings up the bare docs I already get.

I have applied the recommended Dart/Flutter settings as suggested here, which also did not solve my issue.

Merritt
  • 445
  • 1
  • 6
  • 14
  • Try adding Error Lens extension on vscode. it will show some description like "Creates a text widget." in your example. So if there's some widget parameter needed, it will show directly the description. Its very helpful to me. Its a suggestion. I hope it help you – Raine Dale Holgado Sep 14 '20 at 02:39
  • 1
    This extension does helpfully point out errors, but it doesn't seem to show the docs. – Merritt Sep 14 '20 at 15:26

1 Answers1

1

It seems that as the Dart / Flutter extension is transitioning to LSP for things like docs / autocomplete the docs were removed from the main instance due to performance issues. You can get docs by enabling the dart.previewLsp setting.

In addition it looked like the docs weren't there for me after enabling the LSP Preview, however it just didn't look like it because the arguments fit so well and there was no visual indictation you could scroll until you move your mouse into the popup.

Specifically for me this was mostly happening because I increase my editor.fontSize from the default 14 to 20, which also changes the font size of this popup. For reference here is the comparison with the different font sizes enabled:

14 pt font (default):

enter image description here

20 pt font:

enter image description here

Update:

The rest of this answer is outdated as VSCode has added the native ability to resize the popups, as seen here.


The popup size being too small is apparently a well-known and unfixed issue in VSCode, for which I found a workaround at this answer: https://stackoverflow.com/a/62963539/9872288

After applying this workaround the description is readily visible even with increased font size:

enter image description here

Regarding the lack of syntax coloring there is an open issue for it here (for the Dart / Flutter extension) and here (for VSCode).

Merritt
  • 445
  • 1
  • 6
  • 14