This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Additional Configuration Options for Statusline Elements #12922
Labels
C-enhancement
Category: Improvements
Description
Currently the statusline in Helix does everything I want it to. Namely display information about
I settled on the following configuration for statusline
Improvement
I would like additional configuration options (with sensible defaults, of course) for the different "elements" in the statusline (similar to Starship). This would open up several configuration possiblities that would serve to improve the looks and functionality of the statusline.
Custom Format
On the left side of my statusline I have

Here, I do not like the way the
selections
andprimary-selection-length
"elements" are rendered. I would like to define a custom format for the render. Something like -Which would then only render the count, eg -
5
rather than5 sel
Note that this would not only help with decluttering/theming but also allow for reactive separators.


For example, to the right I have
This, is quite ugly. However, that is only because there are no diagnostics in my workspace/file. When the workspace is populated with a few errors, the statusline looks like
Which looks nice.
Adding in a
format
option would allow me to do something likeWhich would only render the separator if the
workspace-diagnostics
element was also rendered.Custom Color
In the center I have

This would look a lot better if the different elements were of a different color.
Something like
The
bg
key will be inherited from statusline color since it is not set here.Always Render
An always render option would solve the problem of the statusline looking odd when components are expected to render, but are kept hidden.
For example -
● 0 ● 0 ● 0 ● 0 │ W ● 0 ● 0 ● 0 ● 0
. But something like● 0 | W ● 0
would look nice or even● | W ●
(green dots)Miscellaneous Options
There are several more options that I would like to configure for the statusline. An example is described below.
The
git_branch
element from Starship perfectly explains what I would like to see. It provides the user with a key which removes the git_branch plugin from the prompt if the current branch is equal to a few values. For example, for helixThis would make it so that statusline only shows the branch if it is not equal to "main" or "master".
The text was updated successfully, but these errors were encountered: