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

nim: types shouldn't be highlighted as keywords #2136

Merged
merged 2 commits into from May 12, 2022

Conversation

narimiran
Copy link
Contributor

This was requested by the author of Nim himself: @Araq.

@jeanas
Copy link
Contributor

jeanas commented May 12, 2022

Could you explain the rationale behind this change? Keyword.Type isn't highlighted the same as Keyword in the default style, e.g.:

image

If you are using another style that doesn't have a rule for Keyword.Type, it might be a matter of adding it.

Now, another reason for changing to Name would be if these aren't really reserved keywords (like type names are in, e.g., Python -- they're just built-in objects in the default namespace, they can be rebound if you really want to), but in that case wouldn't Name.Builtin be a better fit?

@birkenfeld
Copy link
Member

I'd like to add that you can see in the diff view that Github also colors the types...

@narimiran
Copy link
Contributor Author

if these aren't really reserved keywords

Correct.

in that case wouldn't Name.Builtin be a better fit?

Probably. I'll update my PR.

@jeanas
Copy link
Contributor

jeanas commented May 12, 2022

Sounds fine to me. @birkenfeld WDYT?

@birkenfeld
Copy link
Member

Sure!

@jeanas jeanas merged commit 25d752c into pygments:master May 12, 2022
@narimiran narimiran deleted the fix-nim branch May 19, 2022 13:01
@jeanas jeanas added changelog-update Items which need to get mentioned in the changelog and removed changelog-update Items which need to get mentioned in the changelog labels May 20, 2022
@jeanas jeanas added this to the 2.13.0 milestone May 20, 2022
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.

None yet

3 participants