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

add tree-sitter-git-diff #1373

Merged
merged 7 commits into from
Dec 29, 2021

Conversation

the-mikedavis
Copy link
Member

primarily meant to be used in verbose commit diffs with the injections:

but I also added config for it to be used on *.diff files.

There was a fun bug to hunt down in the grammar that prevented me from including it on #1338 (see #1338 (comment)), but I fixed that in this commit: the-mikedavis/tree-sitter-git-commit@066e395 (actually, the one in the screenshot above ^^), and now the injections seem to be working really well 🎉

@the-mikedavis
Copy link
Member Author

buggy-diff

Whoops looks like there might still be a bug or two to sort out. I'll turn this into a draft until I figure this one out 🤔

@the-mikedavis the-mikedavis marked this pull request as draft December 26, 2021 17:19
the-mikedavis added a commit to the-mikedavis/helix that referenced this pull request Dec 26, 2021
This ensures that children nodes of $.message are included in the
injection, such as $.user or issue/pr numbers. Without this change,
diffs containing '#' or '@' characters can trip up the injection and
be parsed separately.

See helix-editor#1373 (comment)
@the-mikedavis
Copy link
Member Author

buggy-diff-fixed

Ah actually it was a pretty small change, just needed to ensure that injection.include-children was set so those pesky (message (user)) nodes are included in the injection.

@the-mikedavis the-mikedavis marked this pull request as ready for review December 26, 2021 17:37
the-mikedavis added a commit to the-mikedavis/helix that referenced this pull request Dec 26, 2021
This ensures that children nodes of $.message are included in the
injection, such as $.user or issue/pr numbers. Without this change,
diffs containing '#' or '@' characters can trip up the injection and
be parsed separately.

See helix-editor#1373 (comment)
This ensures that children nodes of $.message are included in the
injection, such as $.user or issue/pr numbers. Without this change,
diffs containing '#' or '@' characters can trip up the injection and
be parsed separately.

See helix-editor#1373 (comment)
@archseer archseer merged commit bcf3808 into helix-editor:master Dec 29, 2021
@the-mikedavis the-mikedavis deleted the md-tree-sitter-gitdiff branch December 29, 2021 19:31
# 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.

3 participants