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 map | Description |
|---|---|
| ]s | Move to next misspelled word |
| [s | Move to previous misspelled word |
To add words to your own word lists:
| Key map | Description |
|---|---|
| zg | Add word under the cursor to the dictionary |
Finding suggestions for bad wrods:
| Key map | Description |
|---|---|
| z= | Show suggest correctly spelled words |
Resources
Also you can execute this command to view the help in neovim
:h spell