nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.03k stars 463 forks source link

Feat: default on_click for some components #926

Open teto opened 1 year ago

teto commented 1 year ago

Requested feature

I think it would make sense for some component to have a default on_click implementation.

Right now, I have added some code for the following components:

Feel free to close if you think it's out of scope.

shadmansaleh commented 1 year ago

I don't think it's a bad idea to add some default on clicks. But uses of on-click seem quite user-specific. Current way of using on-click isn't exactly hard so, for now, I'll leave it up to the users to decide what they want to do with it. If some well-accepted pattern appears as use case for this I'm open to adding that as default behavior in future.

teto commented 1 year ago

I dont advocate to add one for every component (though having an extra feature rather than none should not be an issue from a UX perspective) but I think the "copy filename" case is quite a compelling one ? I could send PR if you agree.