Skip to content

feat: Added csharp syntax highlighting#856

Open
licon4812 wants to merge 5 commits intomicrosoft:mainfrom
licon4812:syntax-highlighting/csharp
Open

feat: Added csharp syntax highlighting#856
licon4812 wants to merge 5 commits intomicrosoft:mainfrom
licon4812:syntax-highlighting/csharp

Conversation

@licon4812
Copy link
Copy Markdown
Contributor

@licon4812 licon4812 commented May 7, 2026

This pull request adds initial support for C# syntax highlighting by introducing a new C# language definition and an associated test file. It also updates the highlighting engine to treat C# preprocessor directives with a specific highlight color.

C# syntax highlighting support:

  • Added a new C# language definition in csharp.lsh, covering preprocessor directives, comments, various string and character literal forms, attributes, keywords, numeric literals, and method names.
  • Introduced a comprehensive C# test file (csharp.cs) to validate the new syntax highlighting rules.

Highlighting engine improvements:

  • Updated the buffer implementation to highlight C# preprocessor directives (meta.preprocessor) using the BrightBlue color.
Screenshot image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant