You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Code Preview Broken for Multi-Line Compound Declaration #4968
The Code Preview (shown by moving the cursor over a symbol whilst holding Cmd ⌘) shows the code preview for the first symbol in a multiline compound declartion.
Then, type endScreenAnimationController, and move the cursor over a symbol whilst holding Cmd ⌘ to show the symbol preview. The symbol preview will show the first line of compound declaration, instead of the line where endScreenAnimationController is declared.
Unfortunately not.. VS Code just asks us for the range of the definition and then it goes and reads the file contents for that range and shows it here.
If the declaration is a single variable, we could still expand it to be the whole declaration, but otherwise it will only be the range from the start of the variable name to the end of the value - we can't provide multiple ranges.
This is fixed by dart-lang/sdk@0b170c7. The change is in the Dart analysis server so will show up in a future Dart/Flutter SDK release (rather than a Dart-Code extension release).
Activity
DanTup commentedon Jan 31, 2024
Thanks, I can repro this:
Seems like in the Definition response we return the whole declaration list range and not only the single variable declaration:
Number-3434 commentedon Jan 31, 2024
Okay, thanks!
Also, would it be possible to show the first part of the declaration in the preview?
For example, in your example above, could you show var b?
DanTup commentedon Jan 31, 2024
Unfortunately not.. VS Code just asks us for the range of the definition and then it goes and reads the file contents for that range and shows it here.
If the declaration is a single variable, we could still expand it to be the whole declaration, but otherwise it will only be the range from the start of the variable name to the end of the value - we can't provide multiple ranges.
[analysis_server] Don't expand variable declarations to their lists i…
DanTup commentedon Apr 17, 2024
This is fixed by dart-lang/sdk@0b170c7. The change is in the Dart analysis server so will show up in a future Dart/Flutter SDK release (rather than a Dart-Code extension release).