Dart-Code / Dart-Code

Dart and Flutter support for VS Code
https://dartcode.org/
MIT License
1.5k stars 307 forks source link

How to make this more readable? #5310

Closed niamotullah closed 1 week ago

niamotullah commented 1 month ago

this is how it looks now and it's less readable. Screenshot from 2024-10-13 23-41-28

how to format it so parameters are aligned at left and types shows after parameter names on hover. is it possible?

(new) ThemeData ThemeData.from(
  something,  < required int >,
    {
       colorScheme,  < required ColorScheme >
       textTheme,    < TextTheme? >
       useMaterial3,  < bool? >
    }
)

or maybe something else which is little more readable

DanTup commented 1 month ago

Unfortunately it's not possible to use hovers inside this (this is the "Parameter Hints" popup, which is rendered by VS Code). The only thing we can do is supply is some markdown documentation / code block and the text for each parameter:

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#parameterInformation

Moving the types to the right would break the syntax highlighting - this code is highlighted by the textmate grammar used for code in the editor. If we put the types on the right, the coloring would all be wrong and look much worse (or have to be completely removed).

If you have any other suggestions, or if there are other languages in VS Code that you think handle this better that we could borrow from, please let me know!

github-actions[bot] commented 2 weeks ago

This issue has been marked stale because it is tagged awaiting-info for 20 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days.