Feature request: Diff directories (not git rev)
Situation: Have two folders, e.g., two worktrees.
Desired behavior: :DiffView path1/ path2/ (or equiv) and DiffView behaves as expected relative to the folders instead of the git rev.
If this is already possible, please add this as a use case to the docs! It's powerful agnostic of the versioning tools used.
Currently it seems diffing non-git files are not supported. Either git or hg adapter needs to be selected.
https://github.com/sindrets/diffview.nvim/blob/4516612fe98ff56ae0415a259ff6361a89419b0a/lua/diffview/lib.lua#L19-L39
Also advocating for this function.
The name diffview.nvim sounds like a general diffing view as alternative and enhancement to nvim diff, but without this functionality it seems more like gitdiff.nvim, vcsdiff.nvim or something.
I haven't read code carefully, but on skip reading It seems like diffview.nvim is diffing manually but not relying on something like git diff. So hopefully it will be convenient to extend diffview to general files not being tracked by git?
https://github.com/sindrets/diffview.nvim/blob/4516612fe98ff56ae0415a259ff6361a89419b0a/lua/diffview/diff.lua#L100-L130
It could be using git diff --no-index path1 path2 which works well for any paths (file, dir, that is inside or outside a repo)
I'm assuming here (but am not sure at all) that diffview integrates with the output of git diff 🤔
It could be using git diff --no-index path1 path2 which works well for any paths
Does diffview have support for this? POSIX diff can do this too I'm afraid. But we need an integration into nvim tui.