Skip to content

How configure spell checking in neovim

Posted on:November 28, 2024 at 06:23 PM

Configure spelling into neovim

We need to configure two options such as spell and language.

Lua configuration

vim.opt.spell = true

-- you can configure any language
-- default is `en`
vim.opt.spelllang = "en_us"

If you are using vim script

:setlocal spell spelllang=en_us

Keymaps

To search for the next misspelled word:

Key mapDescription
]sMove to next misspelled word
[sMove to previous misspelled word

To add words to your own word lists:

Key mapDescription
zgAdd word under the cursor to the dictionary

Finding suggestions for bad wrods:

Key mapDescription
z=Show suggest correctly spelled words

Resources

Also you can execute this command to view the help in neovim

:h spell