2.1.0 (#241)
• removes the <esc> keybinding for popups which was causing folks to lose their changes • deprecates the backup register. • updates go-gitlab to latest in order to get "drafts" functionality • fixes issues with labels not deleting correctly • creates a new data() function to get data from the plugin directly, see :h gitlab.nvim.data • fixes issues with line values not being computed directly, blocking jumps to/from discussion tree This is a #MINOR release.
This commit is contained in:
committed by
GitHub
parent
12c4acb297
commit
36f512cd6d
@@ -26,7 +26,6 @@ M.settings = {
|
||||
attachment_dir = "",
|
||||
help = "g?",
|
||||
popup = {
|
||||
exit = "<Esc>",
|
||||
perform_action = "<leader>s",
|
||||
perform_linewise_action = "<leader>l",
|
||||
width = "40%",
|
||||
@@ -40,7 +39,6 @@ M.settings = {
|
||||
help = nil,
|
||||
pipeline = nil,
|
||||
squash_message = nil,
|
||||
backup_register = nil,
|
||||
},
|
||||
discussion_tree = {
|
||||
auto_open = true,
|
||||
@@ -270,10 +268,6 @@ M.set_popup_keymaps = function(popup, action, linewise_action, opts)
|
||||
if opts == nil then
|
||||
opts = {}
|
||||
end
|
||||
vim.keymap.set("n", M.settings.popup.exit, function()
|
||||
exit(popup, opts)
|
||||
end, { buffer = popup.bufnr, desc = "Exit popup" })
|
||||
|
||||
if action ~= "Help" then -- Don't show help on the help popup
|
||||
vim.keymap.set("n", M.settings.help, function()
|
||||
local help = require("gitlab.actions.help")
|
||||
@@ -283,9 +277,6 @@ M.set_popup_keymaps = function(popup, action, linewise_action, opts)
|
||||
if action ~= nil then
|
||||
vim.keymap.set("n", M.settings.popup.perform_action, function()
|
||||
local text = u.get_buffer_text(popup.bufnr)
|
||||
if M.settings.popup.backup_register ~= nil then
|
||||
vim.cmd("0,$yank " .. M.settings.popup.backup_register)
|
||||
end
|
||||
if opts.action_before_close then
|
||||
action(text, popup.bufnr)
|
||||
exit(popup, opts)
|
||||
@@ -304,6 +295,13 @@ M.set_popup_keymaps = function(popup, action, linewise_action, opts)
|
||||
linewise_action(text)
|
||||
end, { buffer = popup.bufnr, desc = "Perform linewise action" })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("BufUnload", {
|
||||
buffer = popup.bufnr,
|
||||
callback = function()
|
||||
exit(popup, opts)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- Dependencies
|
||||
@@ -314,6 +312,7 @@ end
|
||||
M.dependencies = {
|
||||
user = { endpoint = "/users/me", key = "user", state = "USER", refresh = false },
|
||||
info = { endpoint = "/mr/info", key = "info", state = "INFO", refresh = false },
|
||||
latest_pipeline = { endpoint = "/pipeline", key = "latest_pipeline", state = "PIPELINE", refresh = true },
|
||||
labels = { endpoint = "/mr/label", key = "labels", state = "LABELS", refresh = false },
|
||||
revisions = { endpoint = "/mr/revisions", key = "Revisions", state = "MR_REVISIONS", refresh = false },
|
||||
project_members = {
|
||||
|
||||
Reference in New Issue
Block a user