solorice/config/yazi/plugins/git.yazi
Kristofers Solo 1a19d1112b
Update 2025-06-30
Update 2025-06-06

Update 2025-06-08

Update 2025-06-11

Update 2025-06-11

Update 2025-06-18

Update 2025-06-24
2025-07-16 15:34:39 +03:00
..
LICENSE Update: 2024-10-17 2024-10-18 09:09:49 +03:00
main.lua Update 2025-06-30 2025-07-16 15:34:39 +03:00
README.md Update 2025-05-31 2025-06-02 13:16:33 +03:00

git.yazi

Show the status of Git file changes as linemode in the file list.

https://github.com/user-attachments/assets/34976be9-a871-4ffe-9d5a-c4cdd0bf4576

Installation

ya pkg add yazi-rs/plugins:git

Setup

Add the following to your ~/.config/yazi/init.lua:

require("git"):setup()

And register it as fetchers in your ~/.config/yazi/yazi.toml:

[[plugin.prepend_fetchers]]
id   = "git"
name = "*"
run  = "git"

[[plugin.prepend_fetchers]]
id   = "git"
name = "*/"
run  = "git"

Advanced

You can customize the Style of the status sign with:

  • th.git.modified
  • th.git.added
  • th.git.untracked
  • th.git.ignored
  • th.git.deleted
  • th.git.updated

For example:

-- ~/.config/yazi/init.lua
th.git = th.git or {}
th.git.modified = ui.Style():fg("blue")
th.git.deleted = ui.Style():fg("red"):bold()

You can also customize the text of the status sign with:

  • th.git.modified_sign
  • th.git.added_sign
  • th.git.untracked_sign
  • th.git.ignored_sign
  • th.git.deleted_sign
  • th.git.updated_sign

For example:

-- ~/.config/yazi/init.lua
th.git = th.git or {}
th.git.modified_sign = "M"
th.git.deleted_sign = "D"

License

This plugin is MIT-licensed. For more information check the LICENSE file.