Olical / aniseed

Neovim configuration and plugins in Fennel (Lisp compiled to Lua)
https://discord.gg/wXAMr8F
The Unlicense
606 stars 28 forks source link

Fix boot up when setting aniseed#env as a dictionary #32

Closed mhanberg closed 3 years ago

mhanberg commented 3 years ago

The docs state that you can set this variable either v:true or an options dictionary, but by setting it to a dictionary, an exception would be raised saying 'Can only compare dictionary with a dictionary'.

Olical commented 3 years ago

I could've sworn I tested this and it was working! I'll double check again now, but so sorry for the issue and thank you very much for submitting a fix. It's hugely appreciated.

Olical commented 3 years ago

So this fixed the case of providing a map but broke the v:true -> {} case because it needed an extra let. VimScript being VimScript :sweat_smile:

So, I did what I should've done a while ago: I simplified the VimScript and moved the type checking into Fennel rather than adding the let. Your way would've worked fine but this has just prompted me to delete some more viml and write more fennel, something that tends to always be good. Thank you for spotting the bug and fixing it initially!