You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/gitlab.nvim.txt
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -223,11 +223,22 @@ you call this function with no values the defaults will be used:
223
223
toggle_unresolved_discussions = "U", -- Open or close all unresolved discussions
224
224
refresh_data = "<C-R>", -- Refresh the data in the view by hitting Gitlab's APIs again
225
225
print_node = "<leader>p", -- Print the current node (for debugging)
226
+
edit_suggestion = "se", -- Edit comment with suggestion preview in a new tab
227
+
reply_with_suggestion = "sr", -- Reply to comment with a suggestion preview in a new tab
228
+
apply_suggestion = "sa", -- Apply the suggestion to the local file with a preview in a new tab
229
+
},
230
+
suggestion_preview = {
231
+
apply_changes = "ZZ", -- Close suggestion preview tab, and post comment to Gitlab (discarding changes to local file). In "apply mode", accept suggestion, commit changes, then push to remote and resolve thread
232
+
discard_changes = "ZQ", -- Close suggestion preview tab and discard changes in local file
233
+
attach_file = "ZA", -- Attach a file from the `settings.attachment_dir`
234
+
apply_changes_locally = "Zz", -- Only in "apply mode", close suggestion preview tab and write suggestion buffer to local file (no changes posted to Gitlab)
235
+
paste_default_suggestion = "glS", -- Paste the default suggestion below the cursor (overrides default "glS" (start review) keybinding for the "Note" buffer)
226
236
},
227
237
reviewer = {
228
238
disable_all = false, -- Disable all default mappings for the reviewer windows
229
239
create_comment = "c", -- Create a comment for the lines that the following {motion} moves over. Repeat the key(s) for creating comment for the current line
230
240
create_suggestion = "s", -- Create a suggestion for the lines that the following {motion} moves over. Repeat the key(s) for creating comment for the current line
241
+
create_suggestion_with_preview = "S", -- In a new tab create a suggestion with a diff preview for the lines that the following {motion} moves over. Repeat the key(s) for creating comment for the current line
231
242
move_to_discussion_tree = "a", -- Jump to the comment in the discussion tree
232
243
},
233
244
},
@@ -578,9 +589,11 @@ emojis that you have responded with.
578
589
UPLOADING FILES *gitlab.nvim.uploading-files*
579
590
580
591
To attach a file to an MR description, reply, comment, and so forth use the
581
-
`keymaps.popup.perform_linewise_action` keybinding when the popup is open.
582
-
This will open a picker that will look for files in the directory you specify
583
-
in the `settings.attachment_dir` folder (this must be an absolute path).
592
+
`keymaps.popup.perform_linewise_action` keybinding when the popup is open (or
593
+
the `keymaps.suggestion_preview.attach_file` in the comment buffer of the
594
+
suggestion preview). This will open a picker that will look for files in the
595
+
directory you specify in the `settings.attachment_dir` folder (this must be an
596
+
absolute path).
584
597
585
598
When you have picked the file, it will be added to the current buffer at the
Copy file name to clipboardExpand all lines: lua/gitlab/actions/comment.lua
+45-4Lines changed: 45 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -21,18 +21,32 @@ local M = {
21
21
comment_popup=nil,
22
22
}
23
23
24
+
---Decide if the comment is a draft based on the draft popup field.
25
+
---@returnboolean|nil is_draft True if the draft popup exists and the string it contains converts to `true`. If the draft popup does not exist, return nil.
0 commit comments