Neospeller is a Neovim plugin that provides spell checking functionality using an external spell checker tool called neospeller. It allows users to check the spelling of the text in the current buffer or a selected range within the buffer.
These instructions will help you set up and use Neospeller in your Neovim environment.
- Neovim 0.5.0 or later
- neospeller installed on your system
-
Install the
neospellerexecutable. You can download the latest release from the neospeller GitHub repository -
Install the Neospeller plugin using your preferred plugin manager:
LazyVim:
{ dir = "~/plugins/neospeller.nvim", lazy = false, opts = {}, cmd = "CheckSpell", keys = { { "<leader>S", ":CheckSpell<CR>", mode = { "x", "n" }, desc = "Check spelling" }, { "<leader>D", ":CheckSpellText<CR>", mode = { "x", "n" }, desc = "Check spelling" } } }Packer:
use { "richardhapb/neospeller.nvim", opt = true, config = function() require('neospeller').setup() end, cmd = "CheckSpell", keys = { { "<leader>S", ":CheckSpell<CR>", mode = { "x", "n" }, desc = "Check spelling" }, { "<leader>D", ":CheckSpellText<CR>", mode = { "x", "n" }, desc = "Check spelling" } } }
Plug:
Plug 'richardhapb/neospeller.nvim', {'on': ['CheckSpell', 'CheckSpellText']} " Use with keymaps: " nnoremap <leader>S :CheckSpell<CR> " vnoremap <leader>S :CheckSpell<CR> " nnoremap <leader>D :CheckSpellText<CR> " vnoremap <leader>D :CheckSpellText<CR>
-
Load the Neospeller plugin in your Neovim configuration if you haven't already done so. For example:
require('neospeller').setup()
-
Use the
:CheckSpellcommand to check the spelling of the text in the current buffer or a selected range. For example:-
To check the entire buffer:
:CheckSpell
-
To check a specific range, visually select the text and then run:
:'<,'>CheckSpell -
To check plain text (not considering the language)
:'<,'>CheckSpellText
-
Neospeller will rewrite the buffer with the corrected text in the comments.
Available languages:
- Rust
- Python
- JavaScript
- CSS
- Lua
- C
- Bash
- Plain text