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

c# syntax lexer #367

Open
bjornbouetsmith opened this issue May 28, 2020 · 2 comments
Open

c# syntax lexer #367

bjornbouetsmith opened this issue May 28, 2020 · 2 comments
Labels
help wanted lexer enhancement Lexer works but is not featureful

Comments

@bjornbouetsmith
Copy link

bjornbouetsmith commented May 28, 2020

Improve c# syntax lexer?

Expand number of classes used for lexer?

Hi,
It seems like the syntaxt lexer for c# is extremely primitive compared to other languages.

i.e.

Class names, variable names, methods, properties etc. all gets the same css class.

They all end up using the "n" class - which makes it impossible to make the syntaxt look like anything "real"

I know it might not be easy to expand the lexer since its all regular expressions it seems like, but if just a couple of the above could be fixed it would make everything look so much better

Just look at this example using "vs" chroma style - its pretty boring - missing colors for Type name etc. Just adding a color for the type would improve everything much
image

Compared to how it looks inside Visual Studio:
image

And "source" of the above example:
image

@rogeralsing
Copy link

👍
I see the same issue, I use code examples of both Go and C# on my site. and the C# version seems incomplete.

It's basically just keywords highlighted, no semantics.

C# vs Go seen here
Skärmavbild 2020-08-03 kl  20 01 45

@k12ish
Copy link

k12ish commented Aug 15, 2020

I've encountered a similar problem before with Go #390, It appears that Chroma does not use semantics to highlight types.

Fixing this is definitely a priority.

@alecthomas alecthomas added help wanted lexer enhancement Lexer works but is not featureful labels Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted lexer enhancement Lexer works but is not featureful
Projects
None yet
Development

No branches or pull requests

4 participants