I have filed vim/vim#8950 and awesome @yegappan suggested POC implementation in yegappan/vim@949c4f2 Now, in order to test this, I would need a function following API of https://vimhelp.org/insert.txt.html#complete-functions generating a list of synonyms. Would it be possible for your plugin to add such function, which could be used as a value of 'thesaurusfunc' (same API as for 'completefunc' and 'omnifunc').
I hope it would be also help with your issue #7.
Cc: @reedes and @alem0lars from https://github.com/preservim/vim-lexical
Cross-posted with preservim/vim-lexical#19