-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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 #19469
Comments
So we should add a c# extension again? |
@aeschli I apologize that I don't know the exact workflow around textmate grammar files (see #10481 for proof :). Is it possible to just pick up the .tmLanguage and not the entire C# extension? This way we get C# colorization out of the box as we do for other languages (looks like PHP, C++, etc.). Going forward, the C# folks can maintain the their repo and make a PR to get it into VS Code. |
@chrisdias this is definitely possible and what we currently do for Go, PHP, C++. However, we can also go in the other direction and we can also start to move the Go tmGrammar to the Go extension, the C++ tmGrammar to the C++ extension. When we separated the OmniSharp extension we intentionally did this, so that C# related artifacts can be maintained in one place and in one issue repository. Revisiting this decision is fine, but we should then have some principles for which languages we bundle a tmGrammar with VS Code. What we must avoid is that there is grammar in both VS Code and in the language extension. This has happened for the F# extension and now a grammar is maintained twice... |
@egamma ok, i see the problem, thanks for the explanation. From a customer perspective, having syntax colorization out of the box is goodness. From an engineering perspective it is a pain to maintain these in multiple places. I like the model where the C# grammar is in a single repo that both VS Code and the OmniSharp extension ship:
Thoughts? |
@chrisdias see below for comments
This is a great summary. However, since we now provide extension recommendations, having syntax colorization out of the box is less important. A user will almost always want to use the rich language extension and not just have coloring that comes with VS Code.
This is already the common practice and we should continue to use it, Since the grammars can be used in multiple editors. I must be maintained in a separate repo, e.g., the TypeScript grammar is maintained in https://github.com/Microsoft/TypeScript-TmLanguage.
This assumes that then VS Code becomes the integrator of grammars. This makes sense for some key languages and can include C#, but it doesn't make sense to me as a general rule. VS Code has extensions.
This assumes that the grammar is also included in the extension? The version in the extension will win over the version that is bundled with VS Code so this works. However, this means that the grammar is maintained in both VS Code and the extension. This is done in F# today and has resulted in the F# grammar in VS Code being out of date. The F# extension writers only update the grammar in their extension they don't care updating the grammar bundled with VS Code using a PR. Bottom line we can do this for C#, but not as a general approach. |
Request from C#/OmniSharp team, grammar is now maintained in an OSS repo:
https://github.com/dotnet/csharp-tmLanguage
The text was updated successfully, but these errors were encountered: