Setup statusline

pull/1399/head
Nicky Obreykov 2 months ago
parent 78573b392f
commit 39a8a94e88

@ -809,7 +809,34 @@ require('lazy').setup({
-- and try some other statusline plugin
local statusline = require 'mini.statusline'
-- set use_icons to true if you have a Nerd Font
statusline.setup { use_icons = vim.g.have_nerd_font }
statusline.setup {
use_icons = vim.g.have_nerd_font,
content = {
active = function()
local mode, mode_hl = MiniStatusline.section_mode { trunc_width = 120 }
-- local git = MiniStatusline.section_git { trunc_width = 40 }
local diff = MiniStatusline.section_diff { trunc_width = 75 }
-- local diagnostics = MiniStatusline.section_diagnostics { trunc_width = 75 }
-- local filename = MiniStatusline.section_filename { trunc_width = 140 }
local filename = '%t%m%r'
-- local fileinfo = MiniStatusline.section_fileinfo { trunc_width = 120 }
local location = MiniStatusline.section_location { trunc_width = 75 }
local search = MiniStatusline.section_searchcount { trunc_width = 75 }
return MiniStatusline.combine_groups {
{ hl = mode_hl, strings = { mode } },
-- { hl = 'MiniStatuslineDevinfo', strings = { git, diff, diagnostics, lsp } },
{ hl = 'MiniStatuslineDevinfo', strings = { diff } },
'%<', -- Mark general truncate point
'%=', -- End left alignment
{ hl = 'MiniStatuslineFilename', strings = { filename } },
-- { hl = 'MiniStatuslineFileinfo', strings = { fileinfo } },
{ hl = mode_hl, strings = { search, location } },
}
end,
},
}
-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for

Loading…
Cancel
Save