Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update tree-sitters Erlang and HEEx #2149

Merged
merged 2 commits into from
Apr 17, 2022

Conversation

the-mikedavis
Copy link
Member

HEEx has a small fix for the highlights: {/} should be @keywords like the rest of the templating tokens.

Erlang has a few fixes

  • macros with names that start with underscore like ?_assertEqual/2 are highlighted as macros rather than comment.unused
  • quoted and unquoted atoms are now one node (atom) which simplifies some highlight scenarios
  • all attributes are highlighted as keywords
    • I was trying to be selective before and only cover the built-ins but meh, it's a good-looking highlight for all atttributes ¯\_(ツ)_/¯

Special HEEx templating tokens are highlighted as keywords similar
to EJS/ERB highlights. The braces are templating tokens too. For
example you can conveniently interpolate an attribute's value
like so:

    <div class={unless @show, do: "hidden"}></div>

For consistency these should be highlighted like the other templating
tokens.
changes:

* fixed highlights for callbacks and ifdef/ifndef attributes
* all attributes are now highlighted as keywords for simplicity
* fixed precedence between unused variable and macro highlights
* the 'quoted_atom' rule has been consolidated into 'atom' which
  improves highlights in scenarios where the pattern matches an
  atom
@sudormrfbin sudormrfbin merged commit ad36a02 into helix-editor:master Apr 17, 2022
@the-mikedavis the-mikedavis deleted the md-beam-party-pack-2 branch April 17, 2022 17:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants