Skip to content

mini.statusline: How to Enable icons for Warning, Error, Hint, etc. ? #1177

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

You must be logged in to vote

Customizing statusline content is expected by creating a function and setting it to config.content.active. Like this:

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

Here is an example function used for default content. Copy paste it as my_active_content body as a start and tweak it until you have your final result.


As you pointed in Reddit post, indeed using signs argument in MiniStatusline.section_diagnostics() is the suggested way to customize its signs. So it will be something like this:

local diag_signs = { ERROR = '!', WARN = '?', INFO = '@', HINT = '*' }
local my_active_content = function

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