Skip to content
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

feat(view): global status line option #4417

Closed
wants to merge 1 commit into from

Conversation

matoous
Copy link
Contributor

@matoous matoous commented Oct 22, 2022

Add option to render single global status line instead of rendering status line per view.

With

[editor.statusline]
render = "per_view"

(default)

Screenshot 2022-10-23 at 21 52 52

with

[editor.statusline]
render = "single"

Screenshot 2022-10-23 at 21 50 04

Fixes: #2254

@matoous matoous marked this pull request as draft October 22, 2022 11:19
@CBenoit CBenoit added C-enhancement Category: Improvements A-helix-term Area: Helix term improvements S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 22, 2022
@matoous matoous marked this pull request as ready for review October 23, 2022 19:48
@matoous matoous force-pushed the md/global-status-line branch 2 times, most recently from 9ecc14c to 2ec0b75 Compare October 23, 2022 20:01
@matoous
Copy link
Contributor Author

matoous commented Oct 24, 2022

@CBenoit could you adjust the label to “waiting-on-review” pleas?

@CBenoit CBenoit added S-waiting-on-review Status: Awaiting review from a maintainer. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 24, 2022
Copy link
Member

@dead10ck dead10ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not really familiar enough with the rendering code to have a confident judgment on this PR, but from what I can tell, this change looks good to me. It's surprisingly small.

From what I can tell, is it basically just hiding the individual status lines, or does it actually prevent them from rendering in the first place?

@cd-a
Copy link
Contributor

cd-a commented Nov 9, 2022

Great work @matoous , I love using a single status line!

Don't we also need something equivalent to neovim's winbar to show the file name in at all times? If you have multiple buffers next to each other, you don't know which file is which otherwise when using single status line.

Here's an screenshot of what I mean, latest neovim with laststatus=3 (global status line) and winbar=%f (showing file path):
image

I just feel these 2 features belong together. But maybe this should be in a separate PR? Let me know your thoughts!

@matoous
Copy link
Contributor Author

matoous commented Dec 10, 2022

@dahmc I am sorry, I am not sure if I understand. The filename of the document in currently active window is displayed in the status line. Furthermore, there's bufferline for buffers. I am not sure how else we could display the filename withing single status line.

Add option to render single glboal status line instead of rendering
status line per view.

Fixes: helix-editor#2254
@cd-a
Copy link
Contributor

cd-a commented Dec 11, 2022

@matoous The filename for the currently active buffer is shown in the status line, correct.

What I'm referring to is that we now don't know what the filename of the other buffer is, until we switch to it.

The bufferline doesn't really help here, because there could be 10 open buffers, and it's now clear what the filename of the inactive buffer is exactly.

Does that make sense? :)

@matoous
Copy link
Contributor Author

matoous commented Dec 11, 2022

@dahmc understood. Yet, I am not sure how that would be solved if we have single status line. Maybe a configuration option for bufferline would do? If you want to see the filename for all open views then I don’t think singular status line would work.

@cd-a
Copy link
Contributor

cd-a commented Dec 11, 2022

@matoous Yeah I think the only way to make this work would be how it's done in neovim what I've shown in my screenshot above, using something like a winbar, which sits below the buffer line

@TornaxO7
Copy link
Contributor

TornaxO7 commented Nov 9, 2023

may I ask if I can try to take over this since this PR is almost one year old now?

@matoous
Copy link
Contributor Author

matoous commented Nov 9, 2023

@TornaxO7 sure, feel free to.

@TornaxO7
Copy link
Contributor

TornaxO7 commented Nov 9, 2023

Ok, so would it e fine, if I only focus on the statusline?

@matoous
Copy link
Contributor Author

matoous commented Jan 31, 2024

Closing in favor of @TornaxO7 's PR.

@matoous matoous closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config option for single status line
5 participants