1
0
Fork 0

nvim: fterm - bind glab ci view

This commit is contained in:
Vladimír Dudr 2024-03-19 21:14:57 +01:00
parent c204cfe92f
commit e4e201390f

View file

@ -4,6 +4,7 @@ local M = {
{ '<Space>gg', '<Plug>Lazygit', desc = 'Lazygit' },
{ '<Space>gh', '<Plug>GitHistory', desc = 'Git history' },
{ '<Space>gB', '<Plug>GitBlame', desc = 'Git Blame' },
{ '<Space>gC', '<Plug>GitLabCIView', desc = 'Show gitlab pipeline' },
},
lazy = true,
}
@ -46,9 +47,22 @@ function M.config()
})
end
local gitlab_ci = function()
local file = vim.api.nvim_buf_get_name(0)
local cmd = 'glab ci view'
fterm.scratch({
cmd = cmd,
dimensions = {
height = 0.9,
width = 0.9,
},
})
end
vim.keymap.set('n', '<Plug>Lazygit', function() lazygit:toggle() end, { desc = 'Toggle lazygit' })
vim.keymap.set('n', '<Plug>GitHistory', git_history, { desc = 'Show git history' })
vim.keymap.set('n', '<Plug>GitBlame', git_blame, { desc = 'Show git blame' })
vim.keymap.set('n', '<Plug>GitLabCIView', gitlab_ci, { desc = 'Show gitlab pipeline' })
end
return M