feat: highlight commit while committing #109

Closed
opened 2026-02-10 21:54:23 +00:00 by saidelmark · 0 comments
saidelmark commented 2026-02-10 21:54:23 +00:00

Prerequisites

Problem

The plugin works great when I browse through past commits, but when I run git commit --verbose, I'm left with the defaults, though the content of the buffer is pretty much the same.
There is a treesitter grammar for diffs, but it only makes the default a bit more fancy, doesn't try to use the highlighting of the original language

Compare:
In :G status overview
Image
In G commit (with mentioned diff grammar):
Image
In G commit (without the diff grammar):
Image
In the commit view after committing (yes, looks exactly the same as in status overview):
Image

Proposed solution

Use the same highlighting rules for commit windows

Alternatives considered

No response

### Prerequisites - [x] I have searched [existing issues](https://github.com/barrettruth/diffs.nvim/issues) ### Problem The plugin works great when I browse through past commits, but when I run `git commit --verbose`, I'm left with the defaults, though the content of the buffer is pretty much the same. There is a [treesitter grammar](https://github.com/tree-sitter-grammars/tree-sitter-diff?tab=readme-ov-file) for diffs, but it only makes the default a bit more fancy, doesn't try to use the highlighting of the original language **Compare**: In `:G` status overview <img width="750" height="129" alt="Image" src="https://github.com/user-attachments/assets/0e647981-5fda-4d8e-820c-1fca85198d57" /> In `G commit` (with mentioned diff grammar): <img width="765" height="135" alt="Image" src="https://github.com/user-attachments/assets/28c66d17-f5ec-4823-9bef-54fad24fd6a9" /> In `G commit` (without the diff grammar): <img width="749" height="124" alt="Image" src="https://github.com/user-attachments/assets/ca3c9d69-240d-4db0-937c-162331a3e689" /> In the commit view **after** committing (yes, looks exactly the same as in status overview): <img width="776" height="130" alt="Image" src="https://github.com/user-attachments/assets/207cc608-c2d3-4184-b7fc-297763c7b628" /> ### Proposed solution Use the same highlighting rules for commit windows ### Alternatives considered _No response_
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/diffs.nvim#109
No description provided.