File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,24 @@ return {
2222 -- and try some other statusline plugin
2323 local statusline = require ' mini.statusline'
2424 -- set use_icons to true if you have a Nerd Font
25- statusline .setup { use_icons = vim .g .have_nerd_font }
25+ statusline .setup {
26+ use_icons = vim .g .have_nerd_font ,
27+ content = {
28+ active = function ()
29+ local mode , mode_hl = MiniStatusline .section_mode { trunc_width = 120 }
30+ local filename = MiniStatusline .section_filename { trunc_width = 140 }
31+ local fileinfo = MiniStatusline .section_fileinfo { trunc_width = 120 }
32+
33+ return MiniStatusline .combine_groups {
34+ { hl = mode_hl , strings = { mode } },
35+ ' %<' , -- Mark general truncate point
36+ { hl = ' MiniStatuslineFilename' , strings = { filename } },
37+ ' %=' , -- End left alignment
38+ { hl = ' MiniStatuslineFileinfo' , strings = { fileinfo } },
39+ }
40+ end ,
41+ },
42+ }
2643
2744 -- You can configure sections in the statusline by overriding their
2845 -- default behavior. For example, here we set the section for
You can’t perform that action at this time.
0 commit comments