Skip to content

Virtual text from Inlay hints interferes with virtual text from git blame #126

@KuabeM

Description

@KuabeM

I recently enabled the new built-in inlay hints and noticed that the virtual text inserted by the hints interferes with the virtual text of the git blame text. In the following screenshot, line 75 is 91 chars long, but the inlay hints extend it then to 108 chars.

My git blame config sets the gitblame_virtual_text_column = 100 such that the plain line is below this limit. With the hints, the git blame message should start at 108 chars:

2024-03-26_09-11-27

I don't really know how neovim counts/reports the line length, but is there a way to include the virtual text?
If you give me a hint I'd even like to try and fix this myself.

For reference, this is what it looks like one line above. The git blame message starts at 100 chars.
2024-03-26_09-11-01

My config:

    {
        'f-person/git-blame.nvim', -- show git blame messages
        init = function()
            vim.g.gitblame_message_template = '	<summary> • <date> • <author> • <sha>'
            vim.g.gitblame_enabled = 1
            vim.g.gitblame_virtual_text_column = 100
            vim.g.gitblame_delay = 1000
            vim.g.gitblame_highlight_group = "CursorLine"
        end,
    },

PS: Love the plugin, especially GitBlameCopySHA helps me in my gitworkflow :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions