@@ -246,6 +246,7 @@ require("diffview").setup({
246246 { " n" , " <leader>cb" , actions .conflict_choose (" base" ), { desc = " Choose the BASE version of a conflict" } },
247247 { " n" , " <leader>ca" , actions .conflict_choose (" all" ), { desc = " Choose all the versions of a conflict" } },
248248 { " n" , " dx" , actions .conflict_choose (" none" ), { desc = " Delete the conflict region" } },
249+ { " n" , " g?" , actions .help (" view" ), { desc = " Open the help panel" } },
249250 },
250251 diff1 = { --[[ Mappings in single window diff layouts ]] },
251252 diff2 = { --[[ Mappings in 2-way diff layouts ]] },
@@ -288,35 +289,38 @@ require("diffview").setup({
288289 { " n" , " g<C-x>" , actions .cycle_layout , { desc = " Cycle available layouts" } },
289290 { " n" , " [x" , actions .prev_conflict , { desc = " Go to the previous conflict" } },
290291 { " n" , " ]x" , actions .next_conflict , { desc = " Go to the next conflict" } },
292+ { " n" , " g?" , actions .help (" file_panel" ), { desc = " Open the help panel" } },
291293 },
292294 file_history_panel = {
293- { " n" , " g!" , actions .options , { desc = " Open the option panel" } },
294- { " n" , " <C-A-d>" , actions .open_in_diffview , { desc = " Open the entry under the cursor in a diffview" } },
295- { " n" , " y" , actions .copy_hash , { desc = " Copy the commit hash of the entry under the cursor" } },
296- { " n" , " L" , actions .open_commit_log , { desc = " Show commit details" } },
297- { " n" , " zR" , actions .open_all_folds , { desc = " Expand all folds" } },
298- { " n" , " zM" , actions .close_all_folds , { desc = " Collapse all folds" } },
299- { " n" , " j" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
300- { " n" , " <down>" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
301- { " n" , " k" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
302- { " n" , " <up>" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
303- { " n" , " <cr>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
304- { " n" , " o" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
305- { " n" , " <2-LeftMouse>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
306- { " n" , " <c-b>" , actions .scroll_view (- 0.25 ), { desc = " Scroll the view up" } },
307- { " n" , " <c-f>" , actions .scroll_view (0.25 ), { desc = " Scroll the view down" } },
308- { " n" , " <tab>" , actions .select_next_entry , { desc = " Open the diff for the next file" } },
309- { " n" , " <s-tab>" , actions .select_prev_entry , { desc = " Open the diff for the previous file" } },
310- { " n" , " gf" , actions .goto_file , { desc = " Open the file in a new split in the previous tabpage" } },
311- { " n" , " <C-w><C-f>" , actions .goto_file_split , { desc = " Open the file in a new split" } },
312- { " n" , " <C-w>gf" , actions .goto_file_tab , { desc = " Open the file in a new tabpage" } },
313- { " n" , " <leader>e" , actions .focus_files , { desc = " Bring focus to the file panel" } },
314- { " n" , " <leader>b" , actions .toggle_files , { desc = " Toggle the file panel" } },
315- { " n" , " g<C-x>" , actions .cycle_layout , { desc = " Cycle available layouts" } },
295+ { " n" , " g!" , actions .options , { desc = " Open the option panel" } },
296+ { " n" , " <C-A-d>" , actions .open_in_diffview , { desc = " Open the entry under the cursor in a diffview" } },
297+ { " n" , " y" , actions .copy_hash , { desc = " Copy the commit hash of the entry under the cursor" } },
298+ { " n" , " L" , actions .open_commit_log , { desc = " Show commit details" } },
299+ { " n" , " zR" , actions .open_all_folds , { desc = " Expand all folds" } },
300+ { " n" , " zM" , actions .close_all_folds , { desc = " Collapse all folds" } },
301+ { " n" , " j" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
302+ { " n" , " <down>" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
303+ { " n" , " k" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
304+ { " n" , " <up>" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
305+ { " n" , " <cr>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
306+ { " n" , " o" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
307+ { " n" , " <2-LeftMouse>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
308+ { " n" , " <c-b>" , actions .scroll_view (- 0.25 ), { desc = " Scroll the view up" } },
309+ { " n" , " <c-f>" , actions .scroll_view (0.25 ), { desc = " Scroll the view down" } },
310+ { " n" , " <tab>" , actions .select_next_entry , { desc = " Open the diff for the next file" } },
311+ { " n" , " <s-tab>" , actions .select_prev_entry , { desc = " Open the diff for the previous file" } },
312+ { " n" , " gf" , actions .goto_file , { desc = " Open the file in a new split in the previous tabpage" } },
313+ { " n" , " <C-w><C-f>" , actions .goto_file_split , { desc = " Open the file in a new split" } },
314+ { " n" , " <C-w>gf" , actions .goto_file_tab , { desc = " Open the file in a new tabpage" } },
315+ { " n" , " <leader>e" , actions .focus_files , { desc = " Bring focus to the file panel" } },
316+ { " n" , " <leader>b" , actions .toggle_files , { desc = " Toggle the file panel" } },
317+ { " n" , " g<C-x>" , actions .cycle_layout , { desc = " Cycle available layouts" } },
318+ { " n" , " g?" , actions .help (" file_history_panel" ), { desc = " Open the help panel" } },
316319 },
317320 option_panel = {
318- { " n" , " <tab>" , actions .select_entry , { desc = " Change the current option" } },
319- { " n" , " q" , actions .close , { desc = " Close the panel" } },
321+ { " n" , " <tab>" , actions .select_entry , { desc = " Change the current option" } },
322+ { " n" , " q" , actions .close , { desc = " Close the panel" } },
323+ { " n" , " g?" , actions .help (" option_panel" ), { desc = " Open the help panel" } },
320324 },
321325 help_panel = {
322326 { " n" , " q" , actions .close , { desc = " Close help menu" } },
0 commit comments