-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Improve highlighting of in
.
#169
base: master
Are you sure you want to change the base?
Conversation
This highlights both `in` keywords in multi-iterable `for` loops, and adds highlighting when `in` is used to check if an element is contained in an array.
Can you please add some tests, eg the cases mentioned in #148? You will find examples in the current test script with names like |
|
@non-Jedi I didn't see your comment before pushing my commit. As a newbie user, I think it would help to font-lock |
My most convincing objection is that I kinda get it. Infix function symbols are parsed in a way that's different from normal symbols. |
Sure, the more I thought of that and played with edge cases, the more I agree with you. Clearly, that makes a fix much harder, as you mentioned in the issue. I still have a couple ideas I'd like to try, but it'll be a few days before I can get back to this. |
FWIW, I would prefer just font-locking in |
@mcol, would you be interested in updating this pull request just to add the multi-loop |
This highlights both
in
keywords in multi-iterablefor
loops (#148), and adds highlighting in the cases wherein
is used to check if an element is contained in an array, as inif 2 in [1, 2, 3]
.