Skip to content

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

Merged
merged 1 commit into from
Dec 1, 2016

Conversation

jbodah
Copy link
Collaborator

@jbodah jbodah commented Oct 28, 2016

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 be
discussed in a different PR

Copy link
Member

@kassio kassio left a 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\>\([ (]\)\@='
Copy link
Member

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?

Copy link
Collaborator Author

@jbodah jbodah Nov 1, 2016

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?

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@jbodah
Copy link
Collaborator Author

jbodah commented Nov 1, 2016

Here's a simplified version of the problem:

test_ex______repos_vim-elixir__-_vimrunner0_4636016625788616

And here's this branch:

test_ex______repos_vim-elixir__-_vimrunner0_42362569624178137

@jbodah
Copy link
Collaborator Author

jbodah commented Nov 30, 2016

@kassio should be all set now

@kassio
Copy link
Member

kassio commented Dec 1, 2016

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
@jbodah
Copy link
Collaborator Author

jbodah commented Dec 1, 2016

@kassio rebased

@kassio kassio merged commit 8a0910b into elixir-editors:master Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants