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

fix: single dash breaks yaml highlighting #24

Merged
merged 3 commits into from
Oct 13, 2024

Conversation

qvalentin
Copy link
Collaborator

@qvalentin qvalentin commented Oct 13, 2024

This is a very hacky fix for #23 that adds a new node type "yaml_no_injection_text" which will turn a single "-" between templates into a different node instead of text, so it will not be used for injections.

I would like to get some opinions @baptman21, @kmoschcau.

Effect in a large file:
image

@qvalentin qvalentin force-pushed the fix/single-dash-breaks-yaml-highlighting branch 3 times, most recently from 78f8cf4 to f052365 Compare October 13, 2024 11:01
@qvalentin qvalentin requested a review from baptman21 October 13, 2024 11:03
@kmoschcau
Copy link

I have not yet written any parsers or grammars for tree sitter, so I'm not 100% qualified to look at this, but it looks good to me.

@qvalentin qvalentin force-pushed the fix/single-dash-breaks-yaml-highlighting branch from 305bd76 to a99432a Compare October 13, 2024 18:37
@qvalentin
Copy link
Collaborator Author

Thanks, I just added a comment that if tree-sitter-grammars/tree-sitter-yaml#12 should get resolved, we can revert this.

But until this happens I think this is a good enough solution.

@qvalentin qvalentin merged commit ca52fbf into master Oct 13, 2024
2 checks passed
@qvalentin qvalentin deleted the fix/single-dash-breaks-yaml-highlighting branch October 13, 2024 18:39
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.

3 participants