Error occurred 'local-set!' macro on option-macros.fnl
Error detected while processing /home/krap/dotfiles/fvim/init.lua:
E5113: Error while calling lua chunk: ...he/nvim/hotpot/home/krap/dotfiles/fvim/fnl/core/init.
lua:2: module 'core.options' not found:Compile error in /home/krap/.config/nvim/fnl/core/optio
ns.fnl:1:0
Compile error in /home/krap/.config/nvim/fnl/macros/option-macros.fnl:60:6
unknown identifier in strict mode: value
I added some buffer local autocmd with this macro yesterday and it worked fine. But suddenly it broke with this Error. So I had to delete all functions depends on this macro. I don't understand why this is happened. could you help me?
^[[7mvalue^[[0m (if (nil? ?value)
* Try looking to see if there's a typo.
* Try using the _G table instead, eg. _G.value if you really want a global.
* Try moving this code to somewhere that value is in scope.
* Try binding value as a local in the scope of this code.
stack traceback:
[C]: in function 'error'
...site/pack/packer/start/hotpot.nvim/lua/hotpot/fennel.lua:3422: in function 'assert-
compile'
...site/pack/packer/start/hotpot.nvim/lua/hotpot/fennel.lua:2220: in function 'assert_
compile'
Here is the more logs after previous message.
It seems like fennel compiler thinks local variable ?value as global, but the only difference between set! and local-set! macro is which vim-api to call. I'm confusing..
I created a small function using local-set! just to test out if it works:
https://github.com/shaunsingh/nyoom.nvim/blob/9e875051ac5f5cf4a02fef7c1b7e3988b8053520/fnl/core/commands.fnl#L4-L22
Seems to be working fine so I'll close this for now, feel free to reopen it if you have any issues!