nvim: fterm - bind glab ci view
This commit is contained in:
parent
c204cfe92f
commit
e4e201390f
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue