nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

Ability for users to hook into the setup function's table

Open Alexnortung opened this issue 3 years ago • 2 comments

Some modules does not provide all options or when they are updated they need to be maintained to provide those options. This can be quite annoying in some instances and can maybe even force the user to rewrite their config in extraLuaConfig. This is because there is no way the user can append anything to the setup object.

To deal with this problem we could make a new option for each module (e.g. extraSetupAttrs) which would be an attribute set that could easily be merged with other attribute sets before calling toLuaObject. However this could be a quite large task, so if you have any other suggestions, please comment them.

Alexnortung avatar Jul 25 '22 22:07 Alexnortung

This is actually also a problem for module creators if you want to install treesitter extensions such as https://github.com/p00f/nvim-ts-rainbow. This is currently not possible and would require some refactoring of that module

Alexnortung avatar Jul 27 '22 12:07 Alexnortung

This is a good idea, I think the best way to go about it would be to add an extraOptions or similar to all Lua modules. Shouldn't be hard to refractor, just annoying.

pta2002 avatar Aug 26 '22 08:08 pta2002

A lot of plugins have an extraOptions now so I'll be closing this

pta2002 avatar Mar 02 '23 14:03 pta2002