https://github.com/dannymcgee/vscode-csharp-grammar-extended
https://github.com/dannymcgee/vscode-csharp-grammar-extended
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dannymcgee/vscode-csharp-grammar-extended
- Owner: dannymcgee
- Created: 2019-09-07T22:51:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-06T17:35:41.000Z (almost 2 years ago)
- Last Synced: 2025-03-06T06:51:52.150Z (2 months ago)
- Size: 128 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# C# Grammar Extended
This extension aims to improve the default C# grammar that comes with VS Code by making it more accurate and granular.
**Features**
* In object creation expressions (e.g., `new Foo()`), the object name is tokenized as a class name (`entity.name.type.class.cs`)
* Enum access expressions (e.g., `Foo.Bar`) receive more accurate tokenization if they're cased according to standard conventions (PascalCase for the enum and its members) (`entity.name.type.enum.cs` for the enum, and `entity.name.variable.enum-member.cs` for the member)
* In object access expressions (e.g., `foo.bar.Baz()`), the object name will be tokenized as a static class if PascalCase (`entity.name.class.static.cs`)
* Numeric constants receive more granular tokenization:
* Decimal points are tokenized as punctuation (`punctuation.separator.decimal.cs`)
* Type suffixes (e.g., the `f` in `3.141f`) are tokenized as keywords (`keyword.numeric.type.cs`)
* Exponent prefixes (e.g., the `e` in `3e10`) are tokenized as keywords (`keyword.numeric.exponent.cs`)
* Method definitions and invocations receive specific scopes in addition to the generic `entity.name.function.cs` (`meta.definition.method.cs` and `meta.function-call.cs` respectively)