Repository navigation
Is there any way to use different colors in statusformatl without using ansi escape codes? #4268
Replies: 1 comment 3 replies
|
For the whole status line, yes: use a custom colorscheme rather than escape codes. For different colors for individual fields inside The options documentation describes To change the whole bar, copy your existing theme to a custom Then select that custom theme with If you mean something like a green filename followed by a red line number in the same active bar, these theme entries won't do that; it would need rendering support beyond the documented format-string substitutions. Which Micro version are you using? |
Thanks for clarifying. You're right: changing the whole bar's theme doesn't solve mixing colors within it.
I checked the upstream 2.0.15 renderer. For the ordinary status line, it substitutes
$()values, selects onestatusLineStyle, and passes that same style toscreen.SetContentfor the characters on both sides. There isn't a per-field color directive in that path. It also doesn't parse ANSI/SGR escapes there, so I shouldn't suggest embedding them as a supported solution.For stock 2.0.15, different colors within
statusformatlaren't available through the colorscheme or format-string settings alone. A Lua status function returning text doesn't add styling metadata either. This would need…