|
@@ -232,12 +232,17 @@ MiniDiff.setup({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+local function section_git(args)
|
|
|
|
+ if MiniStatusline.is_truncated(args.trunc_width) then return '' end
|
|
|
|
+ return vim.fn.FugitiveHead()
|
|
|
|
+end
|
|
|
|
+
|
|
require('mini.statusline').setup({
|
|
require('mini.statusline').setup({
|
|
content = {
|
|
content = {
|
|
-- copy-pasted from default, we just want to remove the icon
|
|
-- copy-pasted from default, we just want to remove the icon
|
|
active = function()
|
|
active = function()
|
|
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
|
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
|
- local git = MiniStatusline.section_git({ trunc_width = 75, icon = '' })
|
|
|
|
|
|
+ local git = section_git({ trunc_width = 75 })
|
|
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75, icon = '' })
|
|
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75, icon = '' })
|
|
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
|
|
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
|
|
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
|
|
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
|