Skip to content

Improve syntax highlighting for file-based apps directives #81303

@DamianEdwards

Description

@DamianEdwards

While #78458 added support for syntax highlighting of file-based apps directives, the TextMate grammar for C# was updated in dotnet/csharp-tmLanguage#337 to support highlighting directives but tokenizes that different parts of the directive values to provide a richer colorization experience.

We should improve the Roslyn-based syntax highlighting of file-based apps ignored directives to be as rich as the TextMate grammar:

Image
  • For #:sdk & #:package, the name, @ separator, and version should all be tokenized as separate spans
  • For #:property, the name, = separator, and value should all be tokenized as separate spans
  • For #:project, there is only a value so

Metadata

Metadata

Assignees

Labels

Feature - Run File#: and #! directives and file-based C# programs
No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions