Enable attach()
to work with any buffer given the necessary context data
#682
Labels
enhancement
New feature or request
Could we extend the
gitsigns.attach()
function to allow for attaching to any arbitrary buffer given the necessary git context data? This would allow plugins to utilize gitsigns to attach to any buffer that represents a real git object.The motivation for this is that - from time to time - users ask about the possibility to show inline diffs in diffview.nvim. I figured that using gitsigns with
toggle_linehl
andtoggle_deleted
is perfect for this. Except that currently I can only do this with the current, working tree version of a file (and fugitive buffers).Instead of giving gitsigns the capability to parse diffview URI's, I figured it would be a lot more extensible to extend the
attach()
function such that callers can optionally give it information about:Imagined API
Is this something you'd be willing to include? If so, I can work on a PR.
The text was updated successfully, but these errors were encountered: