* fix: Jumping to wrong buffer (#261)
* fix: Go to last line and show warning when diagnostic is past the end of buffer (#262)
* fix: Get recent pipeline through other means (#266)
* feat: Add keymaps and linewise actions to layouts (#265)

This is a #MINOR release, because we are introducing new keybindings for the comment/note popups.

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
Co-authored-by: sunfuze <sunfuze.1989@gmail.com>
This commit is contained in:
Harrison (Harry) Cramer
2024-04-15 09:56:21 -04:00
committed by GitHub
parent 138b96baea
commit f906af0c3a
20 changed files with 358 additions and 103 deletions

View File

@@ -141,6 +141,10 @@ you call this function with no values the defaults will be used:
},
help = "g?", -- Opens a help popup for local keymaps when a relevant view is focused (popup, discussion panel, etc)
popup = { -- The popup for comment creation, editing, and replying
keymaps = {
next_field = "<Tab>", -- Cycle to the next field. Accepts |count|.
prev_field = "<S-Tab>", -- Cycle to the previous field. Accepts |count|.
},
perform_action = "<leader>s", -- Once in normal mode, does action (like saving comment or editing description, etc)
perform_linewise_action = "<leader>l", -- Once in normal mode, does the linewise action (see logs for this job, etc)
width = "40%",
@@ -522,6 +526,7 @@ in normal mode):
vim.keymap.set("n", "glp", gitlab.pipeline)
vim.keymap.set("n", "glo", gitlab.open_in_browser)
vim.keymap.set("n", "glM", gitlab.merge)
vim.keymap.set("n", "glu", gitlab.copy_mr_url)
<
TROUBLESHOOTING *gitlab.nvim.troubleshooting*
@@ -633,7 +638,7 @@ After the comment is typed, submit it to Gitlab via the |settings.popup.perform_
keybinding, by default |<leader>l|
*gitlab.nvim.create_mr*
create_mr({opts}) ~
gitlab.create_mr({opts}) ~
Starts the process of creating an MR for the currently checked out branch.
>lua
@@ -662,6 +667,15 @@ Starts the process of creating an MR for the currently checked out branch.
• {squash}: (bool) If true, the commits will be marked for
squashing.
After selecting all necessary details, you'll be presented with a confirmation
window. You can cycle through the individual fields with the keymaps defined
in `settings.popup.keymaps.next_field` and `settings.popup.keymaps.prev_field`.
Both keymaps accept a count, i.g., 2<Tab> goes to the 2nd next field.
In the "Delete source branch", "Squash commits", and "Target branch" fields,
you can use the `settings.popup.perform_linewise_action` keymap to either
toggle the Boolean value or to select a new target branch, respectively.
Use the `settings.popup.perform_action` keymap to POST the MR to Gitlab.
*gitlab.nvim.move_to_discussion_tree_from_diagnostic*
gitlab.move_to_discussion_tree_from_diagnostic() ~
@@ -681,7 +695,7 @@ tied to specific changes in an MR.
require("gitlab").create_note()
After the comment is typed, submit it to Gitlab via the `settings.popup.perform_action`
keybinding, by default |<leader>l|
keybinding, by default |<leader>s|.
*gitlab.nvim.toggle_discussions*
gitlab.toggle_discussions() ~
@@ -753,6 +767,13 @@ gitlab.open_in_browser() ~
Opens the current MR in your default web browser.
>lua
require("gitlab").open_in_browser()
<
*gitlab.nvim.copy_mr_url*
gitlab.copy_mr_url() ~
Copies the URL of the current MR to system clipboard.
>lua
require("gitlab").copy_mr_url()
<
*gitlab.nvim.merge*
gitlab.merge({opts}) ~