-
Notifications
You must be signed in to change notification settings - Fork 155
fixes Wrong colour for keyword "length" in keyword list #206 #207
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a screenshot of the difference.
syn keyword elixirKeyword contained abs bit_size byte_size div elem hd length | ||
syn keyword elixirKeyword contained map_size node rem round tl trunc tuple_size | ||
" Kernel functions | ||
syn match elixirKernelFunction contained containedin=elixirGuard '\<is_atom\|is_binary\|is_bitstring\|is_boolean\|is_float\|is_function\|is_integer\|is_list\|is_map\|is_nil\|is_number\|is_pid\|is_port\>\([ (]\)\@=' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use a group on these regex: \<\(is_atom\|...
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so too, but from testing it doesn't seem to make a difference from what I can tell (AFAIK it doesn't matter as long as we don't make use of the captures in the regex). Maybe there's an edge case I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory without the group the \<
and \>
are not applied to each word in the list. So, this: \<\(A\|B\)\>
is equal to \(\<A\>\|\<B\>\)
, whilst \<A\|B\>
isn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better example:
AB
A
B
- with
\<A\|B\>
will match with all 3 lines; - with
\<\(A\|B\)\>
will match only with the last two lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbodah are you going to make this change or should I take this one over?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
80e7b39
to
5fe9dec
Compare
5fe9dec
to
7adebea
Compare
@kassio should be all set now |
Just fix the conflicts with master and I'll hit the green button. |
…s#206 Note that this also removes highlighting in some places that I found it to be useful (e.g. using `is_pid` in a function body) but that can be discussed in a different PR
7adebea
to
d52089a
Compare
@kassio rebased |
fixes Wrong colour for keyword "length" in keyword list #206
Note that this also removes highlighting in some places that I found it
to be useful (e.g. using
is_pid
in a function body) but that can bediscussed in a different PR