Skip to content

Commit message breaks highlighted cursor line #124

@Mo0rBy

Description

@Mo0rBy

Hello!

I found this plugin while looking around for some gitblame plugins for nvim as I use LazyGit or plain old CLI commands for interacting with git and I didn't want to use something like fugitive.nvim just for the git blame features.

The main 2 plugins I found are this one and blamer.nvim. I prefer this plugin as it is a little more built up, but one major issue I have is that the virtual text for the git message disrupts the highlighted cursor line. I think this is best described with some screenshots.

Using the blamer.nvim plugin (and you can see this in the demo on it's Github page) the virtual text of the commit message is overlayed ontop of the highlighted cursor line:
Screenshot 2024-02-22 at 07 40 25

With this plugin, the virtual text looks like it has it's own textbox that breaks up the highlighted cursor line colour:
Screenshot 2024-02-22 at 07 43 02

The git blame implemented with the GitSigns plugin does this even better and has the virtual text look even more like in VSCode, which this git-blame.nvim and blamer.nvim plugins claim to be attempting to replicate:
Screenshot 2024-02-22 at 07 59 53
With this said, I still prefer the highlight group using the Comment colour as it makes the text pop out a bit more and is easier to read, and it's already very obvious that it's not a comment or part of the code I am reading.

Looking at the docs, I think this might be fixable by configuring the nvim_buf_set_extmark parameter, but I'm not entirely sure. I also think it would be better to ensure that the virtual text does not disrupt the highlighted cursor line by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions