Feat: Rewrite diff module to allow for external dependencies as jj.nvim's diff tool (#74)

- Refactor diff into modular architecture (native, diffview, codediff)
- Add the possibility for users to define their own diff backend
- Support external diff tools like diffview.nvim codediff.nvim
- Enable visual mode selection to diff two changes in log buffer
- Add summary tooltip integration with terminal
- Update documentation with new diff workflows
This commit is contained in:
Nicolas GB
2026-01-25 09:39:31 -08:00
committed by GitHub
parent 8ed2aa52aa
commit 335663c3ee
14 changed files with 590 additions and 162 deletions
+2 -2
View File
@@ -83,13 +83,13 @@ function M.describe(description, revset, opts, on_close)
-- Use buffer editor mode (defaults to "buffer" if not configured)
local editor_mode = merged_opts.type or cmd.config.describe.editor.type or "buffer"
if editor_mode == "buffer" then
local jj_cmd = "jj log -r " .. revset .. " --no-graph -T 'coalesce(description, \"\n\")'"
local jj_cmd = "jj log -r " .. revset .. " --quiet --no-graph -T 'coalesce(description, \"\n\")'"
local old_description_raw, success = runner.execute_command(jj_cmd, "Failed to get old description")
if not old_description_raw or not success then
return
end
local log_cmd = "jj log -r " .. revset .. " --no-graph -T 'self.diff().summary()'"
local log_cmd = "jj log -r " .. revset .. " --quiet --no-graph -T 'self.diff().summary()'"
local status_result, success2 = runner.execute_command(log_cmd, "Error getting status")
if not success2 then
return