Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lua/modeline/provider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ function M.lsp()
end

function M.gitinfo()
local alias = { 'Head', 'plus', 'minus', 'delta' }
vim.api.nvim_set_hl(0, 'ModeLineGitHead', { link = 'Title', default = true })
local alias = { 'ModeLineGitHead', 'diffAdded', 'diffChanged', 'diffRemoved' }
return {
stl = function()
return coroutine.create(function(pieces, idx)
Expand All @@ -137,7 +138,7 @@ function M.gitinfo()
if i == 1 or (type(dict[order[i]]) == 'number' and dict[order[i]] > 0) then
parts = ('%s %s'):format(
parts,
('%%#@diff.%s#%s%%*'):format(alias[i], signs[i] .. dict[order[i]])
('%%#%s#%s%%*'):format(alias[i], signs[i] .. dict[order[i]])
)
end
end
Expand Down
Loading