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

enable c-sharp language and highlights #861

Merged
merged 1 commit into from
Oct 17, 2021

Conversation

the-mikedavis
Copy link
Member

Hi again 👋

I found myself jumping over a c-sharp codebase recently and wanted more colors! I see that tree-sitter-c-sharp is already in the set of submodules so I just added the section in language.toml and adapted the highlights from upstream to the ones documented in the book.

I see there was a prior effort in #604 but there're some issues with OmniSharp as the LSP because of how it differs between windows & *nix. I'm not familiar with OmniSharp or any other C# LSPs so I've left that work off of this PR.

@archseer
Copy link
Member

Much appreciated 🎉 !

By the way, now that you've done a few of these, what do you think of some of the TODO nodes listed on https://docs.helix-editor.com/themes.html#syntax-highlighting ? I'm thinking about moving number -> constant.numeric.integer/constant.numeric.float and escape -> constant.character.escape to reduce the amount of toplevel scopes. The markup scope also needs a bit more definition. I'm going to do all these in one sweep since they're going to break any user themes that haven't been merged into runtime/themes.

Feel free to join us on the Matrix Space! We hold various development discussions there.

@archseer archseer merged commit e216e96 into helix-editor:master Oct 17, 2021
@the-mikedavis the-mikedavis deleted the c-sharp-highlights branch October 17, 2021 13:39
@the-mikedavis
Copy link
Member Author

Just joined :)

I saw those notes and I totally agree, especially with the scopes nesting in constant. Some of the scopes I think could be more generic too, like maybe @literal (as in literal data) instead of @constant, and @identifier instead of @variable. It seems hard to find language that works well across programming languages (e.g. functional languages that call variables "bindings" because of immutability or how "property" means something different in pretty much every language 😆)

If you want some help making the change or discussing scopes I'll definitely lend a hand!

raygervais pushed a commit to raygervais/helix that referenced this pull request Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants