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

Add statusline option: filename-display-mode #5279

Conversation

theteachr
Copy link
Contributor

Allows for showing only the filename instead of the path which can sometimes be long.

@kirawi kirawi added A-gui Area: Helix gui improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Dec 24, 2022
@Ordoviz
Copy link
Contributor

Ordoviz commented Dec 24, 2022

I'm not a maintainer, but this should probably be called file-basename.

@the-mikedavis
Copy link
Member

Instead of an option to control the element I think this should be a new statusline element

@theteachr
Copy link
Contributor Author

theteachr commented Dec 25, 2022

Instead of an option to control the element I think this should be a new statusline element

Could we make the FileName (might as well rename to FileBaseName?) element be just the name of the file and add another element for the parent directory of the open file?

@the-mikedavis
Copy link
Member

I don't think we need to modify the current elements. Statusline elements usually have spacing around them that would make it look odd to have a separate element for the basename and the parent directory/directories

@theteachr
Copy link
Contributor Author

I tested with adding a new element which just renders the file base name. I have the following snippet in my Helix Config now.

[editor.statusline]
left = ["mode", "spinner", "file-base-name"]

But I'm concerned that this can lead to a configuration with both file-name and file-base-name that would be redundant.

Anyway, I can close this one and raise another PR where I have added a new StatusLineElement instead of introducing an option.

@the-mikedavis
Copy link
Member

I don't think that's a bad thing - it should be possible to have both file-name and file-base-name

@theteachr
Copy link
Contributor Author

Closing this in favor of #5318.

@theteachr theteachr closed this Dec 27, 2022
@theteachr theteachr deleted the add-statusline-option-filename-display-mode branch January 14, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-gui Area: Helix gui improvements S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants