@@ -94,6 +94,11 @@ M.defaults = {
9494 win_opts = {}
9595 },
9696 },
97+ help_panel = {
98+ win_config = {
99+ win_opts = {}
100+ },
101+ },
97102 default_args = {
98103 DiffviewOpen = {},
99104 DiffviewFileHistory = {},
@@ -120,6 +125,7 @@ M.defaults = {
120125 { " n" , " <leader>cb" , actions .conflict_choose (" base" ), { desc = " Choose the BASE version of a conflict" } },
121126 { " n" , " <leader>ca" , actions .conflict_choose (" all" ), { desc = " Choose all the versions of a conflict" } },
122127 { " n" , " dx" , actions .conflict_choose (" none" ), { desc = " Delete the conflict region" } },
128+ { " n" , " g?" , actions .help (" view" ), { desc = " Open the help panel" } },
123129 },
124130 diff1 = { --[[ Mappings in single window diff layouts ]] },
125131 diff2 = { --[[ Mappings in 2-way diff layouts ]] },
@@ -162,35 +168,42 @@ M.defaults = {
162168 { " n" , " g<C-x>" , actions .cycle_layout , { desc = " Cycle available layouts" } },
163169 { " n" , " [x" , actions .prev_conflict , { desc = " Go to the previous conflict" } },
164170 { " n" , " ]x" , actions .next_conflict , { desc = " Go to the next conflict" } },
171+ { " n" , " g?" , actions .help (" file_panel" ), { desc = " Open the help panel" } },
165172 },
166173 file_history_panel = {
167- { " n" , " g!" , actions .options , { desc = " Open the option panel" } },
168- { " n" , " <C-A-d>" , actions .open_in_diffview , { desc = " Open the entry under the cursor in a diffview" } },
169- { " n" , " y" , actions .copy_hash , { desc = " Copy the commit hash of the entry under the cursor" } },
170- { " n" , " L" , actions .open_commit_log , { desc = " Show commit details" } },
171- { " n" , " zR" , actions .open_all_folds , { desc = " Expand all folds" } },
172- { " n" , " zM" , actions .close_all_folds , { desc = " Collapse all folds" } },
173- { " n" , " j" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
174- { " n" , " <down>" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
175- { " n" , " k" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
176- { " n" , " <up>" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
177- { " n" , " <cr>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
178- { " n" , " o" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
179- { " n" , " <2-LeftMouse>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
180- { " n" , " <c-b>" , actions .scroll_view (- 0.25 ), { desc = " Scroll the view up" } },
181- { " n" , " <c-f>" , actions .scroll_view (0.25 ), { desc = " Scroll the view down" } },
182- { " n" , " <tab>" , actions .select_next_entry , { desc = " Open the diff for the next file" } },
183- { " n" , " <s-tab>" , actions .select_prev_entry , { desc = " Open the diff for the previous file" } },
184- { " n" , " gf" , actions .goto_file , { desc = " Open the file in a new split in the previous tabpage" } },
185- { " n" , " <C-w><C-f>" , actions .goto_file_split , { desc = " Open the file in a new split" } },
186- { " n" , " <C-w>gf" , actions .goto_file_tab , { desc = " Open the file in a new tabpage" } },
187- { " n" , " <leader>e" , actions .focus_files , { desc = " Bring focus to the file panel" } },
188- { " n" , " <leader>b" , actions .toggle_files , { desc = " Toggle the file panel" } },
189- { " n" , " g<C-x>" , actions .cycle_layout , { desc = " Cycle available layouts" } },
174+ { " n" , " g!" , actions .options , { desc = " Open the option panel" } },
175+ { " n" , " <C-A-d>" , actions .open_in_diffview , { desc = " Open the entry under the cursor in a diffview" } },
176+ { " n" , " y" , actions .copy_hash , { desc = " Copy the commit hash of the entry under the cursor" } },
177+ { " n" , " L" , actions .open_commit_log , { desc = " Show commit details" } },
178+ { " n" , " zR" , actions .open_all_folds , { desc = " Expand all folds" } },
179+ { " n" , " zM" , actions .close_all_folds , { desc = " Collapse all folds" } },
180+ { " n" , " j" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
181+ { " n" , " <down>" , actions .next_entry , { desc = " Bring the cursor to the next file entry" } },
182+ { " n" , " k" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
183+ { " n" , " <up>" , actions .prev_entry , { desc = " Bring the cursor to the previous file entry." } },
184+ { " n" , " <cr>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
185+ { " n" , " o" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
186+ { " n" , " <2-LeftMouse>" , actions .select_entry , { desc = " Open the diff for the selected entry." } },
187+ { " n" , " <c-b>" , actions .scroll_view (- 0.25 ), { desc = " Scroll the view up" } },
188+ { " n" , " <c-f>" , actions .scroll_view (0.25 ), { desc = " Scroll the view down" } },
189+ { " n" , " <tab>" , actions .select_next_entry , { desc = " Open the diff for the next file" } },
190+ { " n" , " <s-tab>" , actions .select_prev_entry , { desc = " Open the diff for the previous file" } },
191+ { " n" , " gf" , actions .goto_file , { desc = " Open the file in a new split in the previous tabpage" } },
192+ { " n" , " <C-w><C-f>" , actions .goto_file_split , { desc = " Open the file in a new split" } },
193+ { " n" , " <C-w>gf" , actions .goto_file_tab , { desc = " Open the file in a new tabpage" } },
194+ { " n" , " <leader>e" , actions .focus_files , { desc = " Bring focus to the file panel" } },
195+ { " n" , " <leader>b" , actions .toggle_files , { desc = " Toggle the file panel" } },
196+ { " n" , " g<C-x>" , actions .cycle_layout , { desc = " Cycle available layouts" } },
197+ { " n" , " g?" , actions .help (" file_history_panel" ), { desc = " Open the help panel" } },
190198 },
191199 option_panel = {
192- { " n" , " <tab>" , actions .select_entry , { desc = " Change the current option" } },
193- { " n" , " q" , actions .close , { desc = " Close the panel" } },
200+ { " n" , " <tab>" , actions .select_entry , { desc = " Change the current option" } },
201+ { " n" , " q" , actions .close , { desc = " Close the panel" } },
202+ { " n" , " g?" , actions .help (" option_panel" ), { desc = " Open the help panel" } },
203+ },
204+ help_panel = {
205+ { " n" , " q" , actions .close , { desc = " Close help menu" } },
206+ { " n" , " <esc>" , actions .close , { desc = " Close help menu" } },
194207 },
195208 },
196209}
0 commit comments