tamton-aquib / staline.nvim

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

Ability to toggle file icons in config #55

Closed harryvince closed 7 months ago

harryvince commented 11 months ago

nvim-web-devicons might be on the system but the user might decide against using them. This pull request enables them by default however gives the user the ability to enable / disable them explicitly in the defaults section of the config.

tamton-aquib commented 10 months ago

Heyyo @harryvince,

Sorry for the late reply 😅. But if the user does not want the icons, we could just pass %f, %F, %t, etc. Let me know what you think

harryvince commented 10 months ago

Hey @tamton-aquib,

And no worries! Thanks for coming back, and even offering some feedback 😄. When I made these changes I was quite new to neovim plugins, in the sense of actually looking at the source for them. I saw this message this morning and had a look back over what I'd done and realised it was probably a bit much. What I've done instead is made file_icon it's own section rather than automatically including it in the file_name section. Therefore meaning the default config won't change but users have greater customisation over sections in their own config. I've overwritten my previous changes as I wasn't happy with them 😅. If you could have a look over the new changes and let me know what you think. It's probably the best way of handling it, but do let me know.

tamton-aquib commented 10 months ago

Its good we separate it for finer customization. But here, its a breaking change for the users. Is there anyway we could add the customization stuff without breaking anything 🤔?

harryvince commented 10 months ago

That's true yeah, i'm not sure unless you've got any suggestions. The default config has been changed so that people using it without customising won't be affected however doesn't change the fact it's a breaking change. Happy to take your steer on this

tamton-aquib commented 10 months ago

What we could do is, keep the file_name as such (name+icon). And add file_icon as separate(you already did this :)). That way:

harryvince commented 10 months ago

Sounds good, just confused on the %f / %t. I think it's just a lack of knowledge from my side. Where in the plugin would this be defined?

tamton-aquib commented 10 months ago

Ah forgot to mention. %char are considered special in statusline, tabline, winbar, statuscolumn etc. :help statusline has mentioned each flag in detail. For example %f is filename, whereas %F is the fullpath and %t is just the tail of the path.

Just noticed this tip is only slightly mentioned in the line_column key in the README. Perhaps we should explicitly mention these 😅

tamton-aquib commented 7 months ago

So hey @harryvince, Is this PR good to be closed?

harryvince commented 7 months ago

@tamton-aquib yeah, happy for this to be closed.