uga-rosa / cmp-dictionary

A dictionary completion source for nvim-cmp
MIT License
236 stars 16 forks source link

No suggestion for for existing words with mistake. #25

Closed JoseConseco closed 2 years ago

JoseConseco commented 2 years ago

Hi, I'm not sure if spellcorrection is in scope of this plugin but I noticed dict suggest words only for new typed in words, but it wont suggest anything of existing words with spell mistake:

https://user-images.githubusercontent.com/13521338/153725534-f5c9a3b5-1dab-4f75-8d2d-ccebe9872c3f.mp4

In video above TabNine suggested correction, but I got not entries from cmp-dict.

Any chances for cmp-dict to suggest correction for spelling mistakes?

uga-rosa commented 2 years ago

Thank you very much. This is a bug. I will fix it. The correct behavior is to look before the cursor, so the candidate appears for 'sent'. image

uga-rosa commented 2 years ago

fixed on 9ae00514826bd26b84d86d67ed999cb4155c33e4

JoseConseco commented 2 years ago

thanks. Btw. is there way to force cmp-dict to take whole word under cursor into account? The way it works now, it only 'checks' for letter that are before cursor. It would be cool if it could check whole workd (and replace it too, rather than what is before cursor).
I will close this.

uga-rosa commented 2 years ago

If you bring the cursor to the end of a word with ea, it will consider the whole word, but isn't that what you're talking about?

JoseConseco commented 2 years ago

yest that works ok. I just wish, cmp-dict could work if cursor in in the middle if word (kind of like cmp-tabnine where it takes into account whole word) , But that is not big deal . Thanks for the fix