return { "sindrets/diffview.nvim", dependencies = { "nvim-lua/plenary.nvim" }, cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles", "DiffviewFileHistory" }, keys = { { "gd", "DiffviewOpen", desc = "Diffview open" }, { "gD", "DiffviewClose", desc = "Diffview close" }, { "gh", "DiffviewFileHistory %", desc = "File history (current)" }, { "gH", "DiffviewFileHistory", desc = "File history (repo)" }, }, opts = { diff_binaries = false, enhanced_diff_hl = true, use_icons = true, show_help_hints = true, watch_index = true, icons = { folder_closed = "", folder_open = "", }, signs = { fold_closed = "", fold_open = "", done = "✓", }, view = { default = { layout = "diff2_horizontal", winbar_info = false, }, merge_tool = { layout = "diff3_horizontal", disable_diagnostics = true, winbar_info = true, }, file_history = { layout = "diff2_horizontal", winbar_info = false, }, }, file_panel = { listing_style = "tree", tree_options = { flatten_dirs = true, folder_statuses = "only_folded", }, win_config = { position = "left", width = 35, }, }, file_history_panel = { log_options = { git = { single_file = { diff_merges = "combined", }, multi_file = { diff_merges = "first-parent", }, }, }, win_config = { position = "bottom", height = 16, }, }, hooks = {}, keymaps = { view = { { "n", "", "DiffviewToggleFiles", { desc = "Toggle file panel" } }, { "n", "q", "DiffviewClose", { desc = "Close diffview" } }, }, file_panel = { { "n", "q", "DiffviewClose", { desc = "Close diffview" } }, }, file_history_panel = { { "n", "q", "DiffviewClose", { desc = "Close diffview" } }, }, }, }, }