2

I've been trying to set up spell checking in neovim.

init.vim:

setlocal spell spelllang=ru_ru

First time it downloaded ru.utf-8.spl and ru.utf-8.sug, just as it probably should. Unfortunately, as soon as I try :set spell/invspell, all the Russian words get highlighted. What am I missing?

UPD:

English spell checking won't work, too (everything misspelled). The files are here /usr/share/nvim/runtime/spell/en.utf-8.spl which looks OK.

UPD:

English spell checking started to work, I am not sure why (I tried spelllang=ru_ru,en_us; Russian won't work even as a single option.

  • I have simple set spelllang=ru,en and it works for me both in vim and nvim for english and russian languages. I toggle it with set spell and set nospell – Maxim Kim Mar 25 at 14:42
  • A few seconds ago I tried :set spelllang=ru_ru manually, and it works! init.vim has setlocal spell spelllang=ru_ru. Why init.vim does not work properly? – Alexey Orlov Mar 25 at 14:47
  • set invspell spelllang=ru_ru,en_us in init.vim works reasonably well. All the tabs open on start get checked in English, as well as in Russian. You can toggle it with :set invspell. I'd appreciate some explaining before creating an answer. – Alexey Orlov Mar 25 at 15:05
  • 1
    It may be because you used setlocal; can you try it with set to force globally setting the option? – D. Ben Knoble Mar 25 at 16:30
0
set spelllang=ru_ru,en_us
nnoremap 99 :set invspell<CR>

This solution is reasonably convenient. A better one is welcome :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.