Closed farbodsz closed 2 years ago
I would like to know what exactly you would like to do. It is not possible to dynamically change the completion candidates as it is now, but probably not that big a change should be necessary. I don't know about the performance impact, though.
Yes exactly - I'm imagining something like this:
spelllang
during their editing sessionIf it would have a large performance impact, I'm happy just to specify those sources together, so that completion for all languages shows up, regardless of what I've set as spelllang
.
I see, you don't want to put the result of spellsuggest()
as a candidate, you want to register a dictionary for each spelllang
like the current implementation of filetype
and filepath
?
Added.
Please register language and dictionary in dic.spelllang
during setup. The plugin cannot detect changes in spelllang
, so be sure to run :CmpDictionaryUpdate
after spelllang
is changed.
Sometimes I write prose in English, or in other languages within vim, and adjust vim's
spelllang
option to get spelling corrections.Is it possible to configure
cmp-dictionary
so that the dictionary (and list of words for completion) changes, depending on whatspelllang
option is set?