Closed katawful closed 2 years ago
It may not be ideal, I need to think of a better solution, but you could use (def X "y") to ensure a table is returned containing a key X and a value y. Not ideal really though, I'll have to think of a way to let people return tables and bypass the module system.
On Mon, 28 Feb 2022, 23:11 Kat, @.***> wrote:
Now that modules always return the module, some Lua interactions break. A Lualine theme built with Aniseed (useful for adjusting colors from a colorscheme built with Aniseed) will now no longer be able to load themes. These plugins expect a file with a table of the colors returned from the file found (i.e. lua/lualine/themes/theme-name.lua for lualine)
While the new method is generally really helpful, it leaves me unable to interact with Lua properly when using Aniseed
— Reply to this email directly, view it on GitHub https://github.com/Olical/aniseed/issues/98, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACM6XNLVR4RAHIKY3MXYETU5P6K7ANCNFSM5PSNPK5Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
https://github.com/katawful/kat.nvim/issues/7#issuecomment-1069595738
Linking here too since I explained within @katawful's project issue too.
Documented this further in the README. I see this now as a documentation issue more than a technical one, I hope that's okay! It will require some small code changes (I hope small!) but it isn't broken as such. I hope...
If you NEED to programmatically export values in a table (like generate those values) you can actually reference your module table under the *module*
symbol, so you could mutate that as the module loads which would export whatever values you put into it.
Now that modules always return the module, some Lua interactions break. A Lualine theme built with Aniseed (useful for adjusting colors from a colorscheme built with Aniseed) will now no longer be able to load themes. These plugins expect a file with a table of the colors returned from the file found (i.e.
lua/lualine/themes/theme-name.lua
for lualine)While the new method is generally really helpful, it leaves me unable to interact with Lua properly when using Aniseed