feat(git): add git module and replace vim-flog with :Glog
This commit is contained in:
+2
-17
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user