feat: support customizing git status sign and style, closes #21
This commit is contained in:
@@ -34,3 +34,42 @@ id = "git"
|
||||
name = "*/"
|
||||
run = "git"
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
> [!NOTE]
|
||||
> This section currently requires Yazi nightly that includes https://github.com/sxyazi/yazi/pull/1637
|
||||
|
||||
You can customize the [Style](https://yazi-rs.github.io/docs/plugins/layout#style) of the status sign with:
|
||||
|
||||
- `THEME.git_modified`
|
||||
- `THEME.git_added`
|
||||
- `THEME.git_untracked`
|
||||
- `THEME.git_ignored`
|
||||
- `THEME.git_deleted`
|
||||
- `THEME.git_updated`
|
||||
|
||||
For example:
|
||||
|
||||
```lua
|
||||
-- ~/.config/yazi/init.lua
|
||||
THEME.git_modified = ui.Style():fg("blue")
|
||||
THEME.git_deleted = ui.Style():fg("red"):bold()
|
||||
```
|
||||
|
||||
You can also customize the text of the status sign with:
|
||||
|
||||
- `THEME.git_modified_sign`
|
||||
- `THEME.git_added_sign`
|
||||
- `THEME.git_untracked_sign`
|
||||
- `THEME.git_ignored_sign`
|
||||
- `THEME.git_deleted_sign`
|
||||
- `THEME.git_updated_sign`
|
||||
|
||||
For example:
|
||||
|
||||
```lua
|
||||
-- ~/.config/yazi/init.lua
|
||||
THEME.git_modified_sign = "M"
|
||||
THEME.git_deleted_sign = "D"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user