mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00

## Description <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> Fixes minor typos in documentation. ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. -->
2.6 KiB
2.6 KiB
🍿 lazygit
Automatically configures lazygit with a theme generated based on your Neovim colorscheme and integrate edit with the current neovim instance.
⚙️ Config
---@class snacks.lazygit.Config: snacks.terminal.Opts
---@field args? string[]
---@field theme? snacks.lazygit.Theme
{
-- automatically configure lazygit to use the current colorscheme
-- and integrate edit with the current neovim instance
configure = true,
theme_path = vim.fs.normalize(vim.fn.stdpath("cache") .. "/lazygit-theme.yml"),
-- Theme for lazygit
theme = {
[241] = { fg = "Special" },
activeBorderColor = { fg = "MatchParen", bold = true },
cherryPickedCommitBgColor = { fg = "Identifier" },
cherryPickedCommitFgColor = { fg = "Function" },
defaultFgColor = { fg = "Normal" },
inactiveBorderColor = { fg = "FloatBorder" },
optionsTextColor = { fg = "Function" },
searchingActiveBorderColor = { fg = "MatchParen", bold = true },
selectedLineBgColor = { bg = "Visual" }, -- set to `default` to have no background colour
unstagedChangesColor = { fg = "DiagnosticError" },
},
win = {
style = "lazygit",
},
}
🎨 Styles
lazygit
{}
📚 Types
---@alias snacks.lazygit.Color {fg?:string, bg?:string, bold?:boolean}
---@class snacks.lazygit.Theme: table<number, snacks.lazygit.Color>
---@field activeBorderColor snacks.lazygit.Color
---@field cherryPickedCommitBgColor snacks.lazygit.Color
---@field cherryPickedCommitFgColor snacks.lazygit.Color
---@field defaultFgColor snacks.lazygit.Color
---@field inactiveBorderColor snacks.lazygit.Color
---@field optionsTextColor snacks.lazygit.Color
---@field searchingActiveBorderColor snacks.lazygit.Color
---@field selectedLineBgColor snacks.lazygit.Color
---@field unstagedChangesColor snacks.lazygit.Color
📦 Module
Snacks.lazygit()
---@type fun(opts?: snacks.lazygit.Config): snacks.win
Snacks.lazygit()
Snacks.lazygit.log()
Opens lazygit with the log view
---@param opts? snacks.lazygit.Config
Snacks.lazygit.log(opts)
Snacks.lazygit.log_file()
Opens lazygit with the log of the current file
---@param opts? snacks.lazygit.Config
Snacks.lazygit.log_file(opts)
Snacks.lazygit.open()
Opens lazygit, properly configured to use the current colorscheme and integrate with the current neovim instance
---@param opts? snacks.lazygit.Config
Snacks.lazygit.open(opts)