seagle0128 / doom-modeline

A fancy and fast mode-line inspired by minimalism design.
https://seagle0128.github.io/doom-modeline/
GNU General Public License v3.0
1.27k stars 157 forks source link

[Feature Request] Modify the contents of VC branch name #731

Closed samvidmistry closed 1 month ago

samvidmistry commented 1 month ago

Is your feature request related to a problem? Please describe. My team follows a convention of xxxx/yyyy/<branch_name> when naming our development branches. The prefix xxxx/yyyy is going to be a constant value per team member. Due to space constraints, modeline only shows xxxx... for all my branches and that provides no information to me as the branch name is the last component in that scheme. I would really like a way to control what gets displayed as my branch name.

Describe the solution you'd like I suppose a configuration value which takes in a function, like (setq doom-modeline-vc-branch-display-func (lambda (branch-name) ...)) or something would be nice.

Describe alternatives you've considered N/A.

Additional context I am not good at elisp so I didn't spend too much time reading the source code. Let me know if this behavior is achievable by other means, say by adding an advice around some function. I am happy to create a PR if someone guides me a little about where I need to make the changes.

seagle0128 commented 1 month ago

A new option doom-modeline-vcs-display-function has been introduced.

samvidmistry commented 1 month ago

Thanks!