kakoune-editor / kakoune-extra-filetypes

Extra highlighters for the Kakoune editor
The Unlicense
30 stars 11 forks source link

git-commit-overflow does not see comments #1

Open camsteffen opened 4 years ago

camsteffen commented 4 years ago
image

This occurs in some scenarios like doing a squash commit. I added some garbage to the first line to better illustrate the issue.

Either beginning comments should be parsed, or if that's too complex, just disable git-commit-overflow functionality altogether when there are comments at the beginning.

lenormf commented 4 years ago

The original implementation handled comments. But then the regex was very long, and I figured the main usecase was for single-commit messages, so simplified the code heavily.

I might revisit the regex to handle squashed commits.

camsteffen commented 4 years ago

Even in a simple git commit, the first line of comments is highlighted as "supposed to be blank". Maybe that case could be fixed more easily.

th1j5 commented 2 years ago

The original implementation handled comments.

Do you still have this one laying around? Because I didn't find it in the history of this repo and I'm also in search of those git-commit editor features (like https://github.com/mawww/kakoune/issues/3228)

Edit: are you referring to https://github.com/mawww/kakoune/issues/3228#issuecomment-558497519? I didn't try everything out yet... Tried and is not handling comments.

lenormf commented 2 years ago

I think that was the implementation, and that it broke after Kakoune stopped interpreting \A as the beginning of the buffer (or something).

th1j5 commented 2 years ago

Thanks! I'll see what I can do with it & learn more about highlighters in the process...