Per our discussion on discord, configuration options are currently being set with __newindex metamethod which means that following code does NOT work:
hilbish.opts.fuzzy = true -- OK, I can see this working
print(hilbish.opts.fuzzy) -- OK, prints: 'true'
for k,v in pairs(hilbish.opts) do print(tostring(k).." = "..tostring(v)) end -- FAIL! does nothing, like if the 'hilbish.opts' was empty
This is super confusing because most Lua projects (e.g. Neovim plugins) rarely use such approach when dealing with configurations. Instead, the default configuration options are usually stored in the regular table and said table gets merged/overwritten with/by user-defined options.
This is probably also an issue with other things like hooks, API functions, etc.
Per our discussion on discord, configuration options are currently being set with __newindex metamethod which means that following code does NOT work:
This is super confusing because most Lua projects (e.g. Neovim plugins) rarely use such approach when dealing with configurations. Instead, the default configuration options are usually stored in the regular table and said table gets merged/overwritten with/by user-defined options.
This is probably also an issue with other things like hooks, API functions, etc.
OS: Arch Linux x86_64 (6.8.2-arch2-1) Hilbish version: https://github.com/Rosettea/Hilbish/commit/11fc1edd9455d83fde3b28e8ad3afbaf0fe5c99d