Closed D00mch closed 2 years ago
This looks like it's a Lua -> VimL conversion issue. An empty Lua table is ambiguous, it can be a sequential or an associative structure so Vim is probably converting it to a list rather than a dict. Not sure how we force this to produce a dict instead of a list... maybe there's a function under :h api
or anywhere else in nvim that allows you to create an empty dict and force it to be a dict 🤔
I'm not at a laptop right now but that's my thinking and where I'd look, I'd look for a function that creates a table that's maybe annotated in such a way that nvim knows to convert the lua table to a dict, not a list, as it crosses the boundary.
Ah yeah, vim.empty_dict()
looks like what you want. I just searched for "neovim lua pass empty dict" for context.
Don't sure if the question is appropriate here, but may be you will be able to answer it immediately:
In your dotfiles you have
dotfilnves.plugin.auto-pairs
where you usenvim.g.AutoPairs
like this:I tried to use jusn an empty table (as it works without this plugin in lisps) with code
But I get the error:
On line 22 of autoPairs there is this line
which doesn't tell me anything.
And before I have this line in vimrc and it worked just fine:
au Filetype clojure let b:AutoPairs={}