docs: lazygit

This commit is contained in:
Folke Lemaitre 2024-11-06 13:30:17 +01:00
parent bbda275681
commit aa17f60c19
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 47 additions and 10 deletions

View file

@ -151,7 +151,8 @@ gui:
dirty = false
end
-- Opens lazygit
-- Opens lazygit, properly configured to use the current colorscheme
-- and integrate with the current neovim instance
---@param opts? snacks.lazygit.Config
function M.open(opts)
---@type snacks.lazygit.Config
@ -170,6 +171,7 @@ function M.open(opts)
return Snacks.terminal(cmd, opts)
end
-- Opens lazygit with the log view
---@param opts? snacks.lazygit.Config
function M.log(opts)
opts = opts or {}
@ -177,6 +179,7 @@ function M.log(opts)
return M.open(opts)
end
-- Opens lazygit with the log of the current file
---@param opts? snacks.lazygit.Config
function M.log_file(opts)
local file = vim.trim(vim.api.nvim_buf_get_name(0))