Setup statusline
This commit is contained in:
parent
78573b392f
commit
39a8a94e88
29
init.lua
29
init.lua
|
@ -809,7 +809,34 @@ require('lazy').setup({
|
||||||
-- and try some other statusline plugin
|
-- and try some other statusline plugin
|
||||||
local statusline = require 'mini.statusline'
|
local statusline = require 'mini.statusline'
|
||||||
-- set use_icons to true if you have a Nerd Font
|
-- 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
|
-- You can configure sections in the statusline by overriding their
|
||||||
-- default behavior. For example, here we set the section for
|
-- default behavior. For example, here we set the section for
|
||||||
|
|
Loading…
Reference in New Issue