f3fora / cmp-spell

spell source for nvim-cmp based on vim's spellsuggest.
191 stars 3 forks source link

\w+ only captures ASCII #2

Closed rdpopov closed 2 years ago

rdpopov commented 2 years ago

I had a problem with non-English spelling completion. Turns out \w+ only captures ascii characters and then cmp doesn't count them as things to complete and cancels the completion. It is an old vim limitation, that is inherited in neovim. Tried it with \k or \K (\K is the better one, excludes numbers) and should work regardless of language? At least it works for both English and any Cyrilic alphabet-based language

zakissimo commented 5 months ago

I see this was closed, but I can't seem to get suggestions for accentuated characters ?

Capture d’écran du 2024-04-12 10-57-34 Capture d’écran du 2024-04-12 10-58-16 Capture d’écran du 2024-04-12 10-57-54

set.spell = true
set.spelllang = "en,fr"
set.spelloptions = "camel"

Am I doing something wrong ?

rdpopov commented 5 months ago

I'm not sure, I just noticed how vim actually represents different alphabets. It's probably something with the patterns again. There is \p or \P for printable. But do thse fall under printable, I will check.