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: support max_length in branch component #1269

Closed
AntonNiklasson opened this issue Jul 2, 2024 · 2 comments
Closed

Feat: support max_length in branch component #1269

AntonNiklasson opened this issue Jul 2, 2024 · 2 comments
Labels
new feature New feature or feature request

Comments

@AntonNiklasson
Copy link

Requested feature

Some of my branches have really long names, but I only care about parts of it in that case. I'd like to set a max length and have the branch name be cut off if longer than that.

@AntonNiklasson AntonNiklasson added the new feature New feature or feature request label Jul 2, 2024
@shadmansaleh
Copy link
Member

You can use the fmt option to do this. We allow you to run you custom formatter on top of component outputs before they get displayed. With that you can achieve this kind of truncation on any component you want not just branch.

https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#general-component-options

@AntonNiklasson
Copy link
Author

Perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or feature request
Projects
None yet
Development

No branches or pull requests

2 participants