Show the status of Git file changes as linemode in the file list.
screenshot-001986.mp4
ya pkg add yazi-rs/plugins:gitAdd the following to your ~/.config/yazi/init.lua:
require("git"):setup {
-- Order of status signs showing in the linemode
order = 1500,
}And register it as fetchers in your ~/.config/yazi/yazi.toml:
[[plugin.prepend_fetchers]]
id = "git"
url = "*"
run = "git"
[[plugin.prepend_fetchers]]
id = "git"
url = "*/"
run = "git"Note
The following configuration must be put before require("git"):setup()
You can customize the Style of the status sign with:
th.git.unknown- status cannot/not yet determinedth.git.modified- modified fileth.git.added- added fileth.git.untracked- untracked fileth.git.ignored- ignored fileth.git.deleted- deleted fileth.git.updated- updated fileth.git.clean- clean file
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.unknown_sign- status cannot/not yet determinedth.git.modified_sign- modified fileth.git.added_sign- added fileth.git.untracked_sign- untracked fileth.git.ignored_sign- ignored fileth.git.deleted_sign- deleted fileth.git.updated_sign- updated fileth.git.clean_sign- clean file
For example:
-- ~/.config/yazi/init.lua
th.git = th.git or {}
th.git.unknown_sign = " "
th.git.modified_sign = "M"
th.git.deleted_sign = "D"
th.git.clean_sign = "✔"This plugin is MIT-licensed. For more information check the LICENSE file.