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

Python "and" operator defined as both a keyword and keyword.operator #9334

Closed
ghost opened this issue Jan 13, 2024 · 2 comments · Fixed by #10160
Closed

Python "and" operator defined as both a keyword and keyword.operator #9334

ghost opened this issue Jan 13, 2024 · 2 comments · Fixed by #10160
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR

Comments

@ghost
Copy link

ghost commented Jan 13, 2024

Summary

I was trying to set the style of keywords for Python code in my custom theme, and I noticed that and was being styled too, even though the other Boolean operators were not. It turns out to be both a keyword and a keyword.operator.

[
"and"
"async"
"class"
"exec"
"global"
"nonlocal"
"print"
] @keyword
[
"and"
"or"
"in"
"not"
"del"
"is"
] @keyword.operator

Reproduction Steps

No response

Helix log

No response

Platform

Linux

Terminal Emulator

alacritty

Installation Method

source

Helix Version

helix 23.10

@ghost ghost added the C-bug Category: This is a bug label Jan 13, 2024
@ghost ghost changed the title Python "and" operator defined as both a keyword and keyword.operator. Python "and" operator defined as both a keyword and keyword.operator Jan 13, 2024
@aspizu
Copy link

aspizu commented Jan 14, 2024

It's weird because this should be the case with in as the in word is used as a operator and also as a keyword in the for in loop.

@the-mikedavis the-mikedavis added the A-language-support Area: Support for programming/text languages label Jan 14, 2024
@kirawi kirawi added E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR labels Mar 31, 2024
@Aityz
Copy link
Contributor

Aityz commented Apr 4, 2024

I will fix this when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants