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 a status line element that shows just the basename of the file #5318

Merged

Conversation

theteachr
Copy link
Contributor

@theteachr theteachr commented Dec 27, 2022

Makes the FileName status line element render just the basename of the open file. The existing variant that renders the relative path of the open file is renamed to FilePath (render functions are also renamed accordingly).

Configuration Snippets

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

image

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

image

@theteachr
Copy link
Contributor Author

Updated Configuration Snippet

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

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

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

This looks good, it just needs a note added to the book for the new element here:

The following statusline elements can be configured:

Co-authored-by: Michael Davis <[email protected]>
@the-mikedavis the-mikedavis merged commit c9ed42c into helix-editor:master Dec 31, 2022
@theteachr theteachr deleted the add-filename-status-line-element branch January 1, 2023 13:04
@theteachr theteachr mentioned this pull request Feb 1, 2023
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.

3 participants