vscode-csharp
vscode-csharp copied to clipboard
Use OmniSharp Razor grammar as default in VS Code
Hello 👋
I work on VS Code and maintain our syntax highlighting grammars there. We pull almost all of our grammars from other OSS repos. The grammar we've been using for Razor is no longer maintained. It looks like you have a maintained grammar: https://github.com/OmniSharp/omnisharp-vscode/blob/master/src/razor/syntaxes/aspnetcorerazor.tmLanguage.json
I'd like to switch over to use the OmniSharp Razor grammar as the default, built-in, Razor grammar in VS Code. I've switched over to use this grammar for the next VS Code Insiders build: https://github.com/microsoft/vscode/pull/163212. If you have any concerns about this please let me know! It should be a much better experience for Razor users in VS Code.
Its with that grammar syntax that I took the screenshots? Specifically that one that doesn't work
@ArmantG this grammar should still be an improvement over the old one even though it still doesn't work for the example you gave (quick testing showed it did better on the snipped we use for testing). And, once we've moved over to a grammar that's actually being maintained we can file issues that may be addressed.
@davidwengier Should this Razor grammar be moved in box?
We have a Razor grammer over here, which I would assume is the one we would keep updated going forward: https://github.com/dotnet/razor-tooling/blob/main/src/Razor/src/Microsoft.AspNetCore.Razor.VSCode.Extension/syntaxes/aspnetcorerazor.tmLanguage.json
Though @allisonchou knows more about this than me I expect :)
I agree with David - if possible, I think it would be best if VS Code pulled the grammar in the razor-tooling repo since it's kept the most up-to-date.
Great, thank you for the pointer. I've updated VS Code pull from https://github.com/dotnet/razor-tooling.
Looks like this got done: https://github.com/microsoft/vscode/pull/163898
@JoeRobich can you close this :)