Skip to content

Improve syntax highlighting for string interpolation #3318

@maxwell8888

Description

@maxwell8888

Further to issue 305, currently, if additional string interpolation is used inside the expression, then only the inner most expression is highlighted, for example with "${(() => '1')()}" the entire expression is highlighted but if you add a nested string interpolation like "${(() => '1 ${2}')()}";, now only the 2 is highlighted. Instead all expressions should be highlighted.

Also, expression code should be highlighted in the same way as normal code. For example, currently with "${String.fromCharCode(36)}" the expression will be highlighted with a single colour. Instead the expression should be highlighted in the same way as String.fromCharCode(36), which uses different colours for the class, method, and integer.

It might also be more clear to highlight the $ and {}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions