Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include C# textmate grammar in VSCode #1206

Closed
aeschli opened this issue Feb 8, 2017 · 1 comment
Closed

Include C# textmate grammar in VSCode #1206

aeschli opened this issue Feb 8, 2017 · 1 comment
Labels
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Feb 8, 2017

As requested by the OmniSharp team (microsoft/vscode#19469) , VSCode now ships with built-in base csharp extension that contains

Our thinking is that in the future the OmniSharp extension can remove these artifacts from its extension.

We'd also be happy to hand over the ownership of built-in csharp extension to the Omnisharp team. Ping me anytime to update the grammar or make changes to the language configuration.

We have an update script for the grammar as well as a test suite that tests the generated scopes and the colors that result with our default themes.

To update the grammar to the latest in https://github.com/OmniSharp/omnisharp-vscode/blob/master/csharp.configuration.json:

  • run npm run update-grammar in vscode/extensions/csharp

To run the tests:

  • run scripts/test-integration.sh in vscode. The test takes the code sample in test/colorize-fixtures and runs the grammar and theme rule matching on it. The result is written to test/colorize-result.
    If the result is identical to the previously written result, the test is green, else it is red. Use the Git diff viewer to see the differences in the result. If all changes make sense, accept the new result by committing the changed result. If not, get back to the CSharp grammar team or to me (for theming issues).
	{
		"c": "Main",
		"t": "source.cs entity.name.function.cs",
		"r": {
			"dark_plus": "entity.name.function: #DCDCAA",
			"light_plus": "entity.name.function: #795E26",
			"dark_vs": "default: #D4D4D4",
			"light_vs": "default: #000000",
			"hc_black": "default: #FFFFFF"
		}
	}

c: Token content, t: TextMate scope stack, r: Colorizer rules matches.
If there are just changes to the TextMate scope stack but coloring stays the same all is fine.
If there are coloring changes, be alert (I'm happy to help)...

@DustinCampbell
Copy link
Member

Thanks very much for the detail! This is fantastic!

One important thing that I'd like to make clear is that this is not "the omnisharp extension". This is C# for Visual Studio Code, which is produced by the C# team (I am a C# team member working for Microsoft). The C# team partners closely with the OmniSharp community on this extension and have decided to keep this extension in the OmniSharp organization on GitHub. However, it still owned by the Microsoft C# team. Also, the VS debugger team is involved here as well, delivering the C# for Visual Studio Code's debugging support. The request came from the Microsoft C# team, not the OmniSharp team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants