feat(git): add git module and replace vim-flog with :Glog

This commit is contained in:
2026-04-13 21:40:52 +02:00
parent 144b2ffd43
commit 959cec7051
8 changed files with 337 additions and 24 deletions
+2 -17
View File
@@ -78,23 +78,8 @@ vim.opt.guicursor:append("a:Cursor")
vim.opt.inccommand = "split"
vim.opt.winborder = "rounded"
function _G._status_line_git()
local status = vim.b.gitsigns_status_dict
if not status then
return ""
end
local added = status.added or 0
local changed = status.changed or 0
local removed = status.removed or 0
return (added + changed + removed) > 0
and "%#NvimTreeGitDirty#M%*"
or ""
end
vim.opt.statusline = " %{expand('%:.')} %{%v:lua._status_line_git()%} %3(%m%)"
require("git").setup()
vim.opt.statusline = "%{expand('%:.')} %{%v:lua.require('git').status()%} %3(%m%)"
.. " %="
.. " %{%v:lua.vim.diagnostic.status()%}"
.. " %{&filetype} %{&fileencoding} %{&fileformat}"