tamton-aquib / staline.nvim

A modern lightweight statusline and bufferline plugin for neovim in lua.
MIT License
373 stars 16 forks source link

Add support for changing the git branch icon #8

Closed is0n closed 3 years ago

is0n commented 3 years ago

Issue

The current branch icon differed from the one I use in my terminal prompt and to change the branch icon, I would have to directly edit the source code.

Solution and Explanation

Call a variable named "branch_symbol" located at tables.lua#L20 when outputting the branch icon. The aforementioned variable can be modified by the user, therefore, adding support for changing the git branch icon.

tamton-aquib commented 3 years ago

This is nice. Thanks for the contribution.

I have thought about putting get_branch() directly into the string before, but it felt a little slow for me. But now its working fine.

I will probably do an autocmd of BufEnter in the near future for updating the branch as it seems more efficient. Thanks again.😅