-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizable statusline #708
Comments
What should be used in the template string to indicate the separation between the left and right sides of the statusline? Maybe |
Maybe we could use the alignment operators: |
If we just use a "separator", such as |
Sounds good. |
Though we'd have to decide what to do if there are less than 2 separators present in the format string. I think:
If you wanted only left and center or right and center, you could do Alternatively, we could just enforce two separators, but I'm not too fond of that idea. |
Or we could do [statusline]
left = "editing {filename}"
center = "Date: {date}"
right = "LSP: {lsp-status}" What do you think about that? |
Conditional templating would also be interesting, e.g. #447. Maybe something like the C++ short hand if else statement ( |
I3status-rust does something similar to what we want. https://github.com/greshake/i3status-rust/blob/master/doc/blocks.md |
I think we want to avoid introducing constructs like that since it will probably spiral into injecting more and more logic handling into a plain toml file and before we know it we would have invented a mini language that's similar to most things out there but also very different from most things out there. It was also brought up in Matrix a while ago and there was a (more or less) general consensus that it's better left to when we have a proper plugin system in place which can be used to dynamically define the config file or an actual configuration programming language (lisps were of interest last time IIRC). |
Perhaps something that should be added as an option for a status line element: cursor count |
Ah yeah, that's something we should add to the default status line too. |
This look like a status line from
|
This is the status line from Lunarvim (an easy to install full-fledged nvim config) but yeah. |
One more which I find useful is the search position from doom emacs, |
IntelliJ has a very simple status line configuration feature: https://www.jetbrains.com/webstorm/guide/tips/customize-status-bar/ It'd look a little like this:
VSCode is similarly restrictive. Furthermore, a plugin author may add status bar items using this API (alignment configurable). In my mind this is really user friendly. Adding and removing features is straight-forward. No knowledge of a template language is required. No need to debug layouts (maybe less need to debug layouts). If you want more control; if a plugin author wants to provide you with more control, they should be able to take full control over status line, though. However, in that case I'm not sure you'd want to impose restrictions such as the use of a specific template language or of specific alignment primitives (left, center, right). A couple more data points:
|
One thing I liked from my vim config was displaying the hex value of the character under the (primary, in helix' case) cursor. I'd love to have that in helix |
Resolved by #2434 |
Following some discussion on #649, it might be a good idea to allow for a configurable statusline through templating. We can borrow some code from here, and make some of the changes suggested by Blaz: 'We might be able to reuse that with some tweaking (lazy_static -> once_cell, disabling styles for now).'
The text was updated successfully, but these errors were encountered: