Skip to content

How do I add a section to mini.statusline? #819

Closed Answered by echasnovski
webmandman asked this question in Q&A
Discussion options

You must be logged in to vote

Customizing statusline structure in 'mini.statusline' is done by completely overriding content function for active and/or inactive windows. Here is a reference example of current default function for active window. So instead of overriding the section_location(), the suggested approach is to have that default content with line local location = '%2l:%-2v' instead of calling section_location().

The overall setup code will look something like this:

local active_content = function()
  -- Your code goes here
end
require('mini.statusline').setup({ content = { active = active_content } })

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants