atom / language-csharp

C# language support for Atom
Other
62 stars 52 forks source link

Incorrect LINQ Syntax Highlighting #114

Closed rvhuang closed 6 years ago

rvhuang commented 6 years ago

I have a piece of example code in my repository which mainly contains LINQ statements. However, where, orderby and select clauses are all not highlighted correctly.

image

Aside from LINQ, normal static function call (Console.WriteLine) is also not highlighted. Please help.

damieng commented 6 years ago

Is this in Atom (if so which version) or on github.com ?

worldbeater commented 6 years ago
var queryable = from step in astar.Except(GetObstacles())
                where step.X >= 0 && step.Y >= 0 && step.X <= 40 && step.Y <= 40
                orderby step.GetManhattanDistance(goal)
                select step;

Seems that is GitHub. Line breaks break highlighting very often. .NET developers have also noticed that here https://github.com/dotnet/dotnet-docker/pull/469

damieng commented 6 years ago

github.com isn't using the language-c# grammar that is in this repo right now - we upgraded to a much newer system that isn't compatible with the mechanism behind github.com.

rvhuang commented 6 years ago

@damieng thanks for the information. Is it possible to forward the issue to GitHub?

damieng commented 6 years ago

It looks like both Atom and GitHub can now use the grammar thanks to @worldbeater :)