ci: docgen

This commit is contained in:
Folke Lemaitre 2024-11-04 16:39:05 +01:00
parent e937bfaa74
commit df333a6a9a
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
17 changed files with 813 additions and 1 deletions

75
docs/lazygit.md Normal file
View file

@ -0,0 +1,75 @@
# lazygit
<!-- docgen -->
## Config
```lua
---@class snacks.lazygit.Config: snacks.terminal.Config
---@field args? string[]
---@field theme? snacks.lazygit.Theme
{
configure = true,
theme_path = vim.fs.normalize(vim.fn.stdpath("cache") .. "/lazygit-theme.yml"),
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" },
},
}
```
## Module
```lua
---@alias snacks.lazygit.Color {fg?:string, bg?:string, bold?:boolean}
```
```lua
---@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
```
```lua
---@class snacks.lazygit
---@overload fun(opts?: snacks.lazygit.Config): snacks.float
Snacks.lazygit = {}
```
### `Snacks.lazygit.log()`
```lua
---@param opts? snacks.lazygit.Config
Snacks.lazygit.log(opts)
```
### `Snacks.lazygit.log_file()`
```lua
---@param opts? snacks.lazygit.Config
Snacks.lazygit.log_file(opts)
```
### `Snacks.lazygit.open()`
Opens lazygit
```lua
---@param opts? snacks.lazygit.Config
Snacks.lazygit.open(opts)
```