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
Different semantic token type for top-level declarations #3778
While developing a VS Code theme specifically for Dart files and trying to set styles for each semantic token type, I found that no distinction can be made between top-level declarations and instance (class-based) ones, since they both have the same token type (property.declaration):
Inspecting a top-level variable:
Inspecting an instance field:
This is why they are both colored the same.
This distinction is made, for example in IntelliJ themes, as can be seen here:
Is there any way to be able to have a different semantic token type for this? For example, adding a instance modifier for declarations, getters and setters that are defined inside a class?
This is fixed by dart-lang/sdk@f0475f6 which adds an "instance" modifier to the instance items. Since the change is in the SDK, it'll show up in a future SDK release rather than a Dart-Code release directly.
Activity
[analysis_server] Add LSP semantic token modifier for instance fields…
DanTup commentedon Jan 18, 2022
This is fixed by dart-lang/sdk@f0475f6 which adds an "instance" modifier to the instance items. Since the change is in the SDK, it'll show up in a future SDK release rather than a Dart-Code release directly.