Closed mrjones2014 closed 1 year ago
Thank for taking an interest in the project!
We don't currently offer a stable public API, as nobody has requested it yet (although I'm not opposed to implement such an interface). However, the following function for getting the currently open view has been available - I believe - since the plugin's release:
local view = require("diffview.lib").get_current_view()
Are there perhaps some global variables like
vim.g.diffview_view_diff3
etc.?
A way to find out what layout is currently in use? If so:
print(view.cur_layout.name)
Awesome, this is perfect! Exactly what I was looking for. Thanks!
Hi, amazing plugin. I'd love to be able to make a legendary.nvim extension for it (basically a way for
legendary.nvim
to automatically load keymaps fromdiffview.nvim
).Since the keymaps are only active when in a
diffview.nvim
-managed view, I would need a way to detect if the current buffer is adiffview.nvim
view (and which one), so that thelegendary.nvim
UI can filter out the keymaps. Are there perhaps some global variables likevim.g.diffview_view_diff3
etc.?I'd be happy to make a PR but I'm not sure what the "right way" to do it would be.