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

Missing highlights for commit diff shown with git commit -v #6

Closed
RubixDev opened this issue Dec 4, 2022 · 4 comments
Closed

Missing highlights for commit diff shown with git commit -v #6

RubixDev opened this issue Dec 4, 2022 · 4 comments

Comments

@RubixDev
Copy link

RubixDev commented Dec 4, 2022

Thank you for your effort, the highlighting based on this parser looks great. There is just one thing that made me switch back to the basic regex highlighting for now: diffs. When creating a commit with git commit -v, the diff of all changed files is shown. Your parser does not highlight this diff and makes it very hard to read.

@gbprod
Copy link
Owner

gbprod commented Dec 5, 2022

Hi!

Diff highlighting is made by language injection. Do you have diff parser installed ?

If you are using nvim-treesitter installed, just do : :TSInstall diff.

If it still not works, can you provide a commit message sample ?

Thanks

@RubixDev
Copy link
Author

RubixDev commented Dec 6, 2022

Thanks for the clue! Not only did I not have the diff parser installed, but it turns out my theme didn't have any theming specified for the diff parsers highlights.

@gbirke
Copy link

gbirke commented Jan 17, 2023

I also ran into this problem and was just about to open an issue when I discovered this issue. Installing diff fixes it, but I'm wondering if you could put this as a tip in the README?

gbirke added a commit to gbirke/dotfiles that referenced this issue Jan 17, 2023
Always install diff and gitcommit highlighting. When diff is missing,
the commit highlighting for `git commit -v` does not appear
(See gbprod/tree-sitter-gitcommit#6 )
@gbprod
Copy link
Owner

gbprod commented Jan 20, 2023

Yep, I'll do that

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

No branches or pull requests

3 participants