nixvim
nixvim copied to clipboard
Ability for users to hook into the setup function's table
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.
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
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.
A lot of plugins have an extraOptions now so I'll be closing this