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

[FEATURE] Highlighting Queries Improvements #53

Open
3 tasks done
Kilenaitor opened this issue Jun 13, 2023 · 1 comment
Open
3 tasks done

[FEATURE] Highlighting Queries Improvements #53

Kilenaitor opened this issue Jun 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Kilenaitor
Copy link

Description

Hi! I read/write a lot of Hack code in my day-to-day. My primary editor is Neovim and I've been hoping to leverage tree-sitter to power syntax highlighting. However, the highlighting queries for Hack are pretty bare-bones: https://github.com/slackhq/tree-sitter-hack/blob/main/queries/highlights.scm

I was curious if you all would accept contributions to at the very least the highlight queries to be more in line with other tree-sitter grammars (here's PHP for comparison).

I'd be potentially interested in augmenting the grammar or the parser as well to allow for more fine-tuned highlight queries, but I'd of course defer to you all for anything backwards incompatible.

Thank you!

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
@Kilenaitor Kilenaitor added the enhancement New feature or request label Jun 13, 2023
@Kilenaitor Kilenaitor changed the title [FEATURE] Highlightiing Queries Improvements [FEATURE] Highlighting Queries Improvements Jun 13, 2023
@4e554c4c
Copy link
Collaborator

treesitter highlighting for Hack in neovim works pretty great. It uses a different highlight query than this project provides: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/hack/highlights.scm
we really just need to sync that file with the highlights provided in this repository.
Another good thing to add would be a locals.scm, since Hack has odd scoping rules.

IMO this is the last thing stopping tree-sitter-hack from being a "maintained" language for nvim-treesitter, it's just been on my backlog for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants