V3: multiple dictionaries
eronde opened this issue · 1 comments
eronde commented
In v2 it was possible to assign multiple dictionary with the switch option, like:
-- dict.switcher({
-- filetype = {
-- -- javascript = { "/path/to/js.dict", "/path/to/js2.dict" },
-- },
-- })
In v3 switcher is deprecated.
If I try to add multiple dictionaries, like
local dict = {
["*"] = { "/home/eric/Dotfiles/vim/dict/nl.txt", "/home/eric/Dotfiles/vim/dict/training_english_GB.txt" },
}
This produces the following error:
Error executing luv callback:
...er/start/cmp-dictionary/lua/cmp_dictionary/dict/trie.lua:43: bad argument #1 to 'decode' (string expected, got nil)
stack traceback:
[C]: in function 'decode'
...er/start/cmp-dictionary/lua/cmp_dictionary/dict/trie.lua:43: in function <...er/start/cmp-dictionary/lua/cmp_dictionary/dict/trie.lua:42>
Error in luv thread:
...er/start/cmp-dictionary/lua/cmp_dictionary/dict/trie.lua:40: Cannot serialise, excessive nesting (1001)
A workaround could be to concatenate the dicts into one dict
uga-rosa commented
Please read the documentation (:h cmp-dictionary-setting
).