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

Improve highlights #18

Closed
wants to merge 2 commits into from
Closed

Improve highlights #18

wants to merge 2 commits into from

Conversation

uncenter
Copy link

@uncenter uncenter commented Dec 9, 2024

Brings over the improvements made downstream: nvim-treesitter/nvim-treesitter#6619.

@the-mikedavis
Copy link
Owner

I'd like to keep the highlights query in this repo simple so that it can be used with tree-sitter-cli's highlight command (which only uses this set of captures by default: https://github.com/tree-sitter/tree-sitter/blob/2c064039c7f790c47c1fefe32a85bee756e957ac/cli/src/highlight.rs#L161-L186).

Instead we could add some comments to the top of this file linking to neovim's and others' queries

@uncenter
Copy link
Author

uncenter commented Jan 3, 2025

Can it not be used if any captures are unknown? I would assume tree-sitter highlight would ignore those captures but still work?

@the-mikedavis
Copy link
Owner

Unknown captures won't cause an error, they just won't highlight the text at all. So diff.plus and diff.minus for example won't cause any highlighting

@uncenter
Copy link
Author

uncenter commented Jan 3, 2025

Gotcha.

@uncenter uncenter closed this Jan 3, 2025
the-mikedavis added a commit that referenced this pull request Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants