Skip to content
Discussion options

You must be logged in to vote

It is possible, yes. This requires writing custom section instead of using section_filename:

local my_filename = function()
  -- In terminal always use plain name
  if vim.bo.buftype == 'terminal' then return '%t' end
  local modified = vim.bo.modified and '' or ''
  return (MiniStatusline.is_truncated(140) and '%f' or '%F') .. modified .. '%r'
end

You can use it in combination with default active content like this:

local active_content = 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.s…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by danwwilson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.statusline
2 participants