Skip to content

matkrin/telescope-spell-errors.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

telescope-spell-errors.nvim

This is a telescope.nvim extension that lists all spelling mistakes in the current buffer using Neovim's built-in spell-checking capabilities.

Installation

lazy.nvim

require("lazy").setup({
    {
        "matkrin/telescope-spell-errors.nvim",
        config = function()
            require("telescope").load_extension("spell_errors")
        end,
        dependencies = "nvim-telescope/telescope.nvim",
    }
})

packer

use "matkrin/telescope-spell-errors.nvim"

vim-plug

Plug "matkrin/telescope-spell-errors.nvim",

After calling require("telescope").setup():

require("telescope").load_extension("spell_errors")

Configuration

Similar to lsp_diagnostics, the results show the type of the spelling mistake (bad | rare | local | caps), its location (row:col) and the word itself. By default these get highlighted according to the your color scheme's highlight color (guisp of SpellBad, SpellCap, SpellRare, SpellLocal) You can overwrite these with the following highlight groups:

Error type Highlight group
bad "TelescopeSpellErrorBad"
rare "TelescopeSpellErrorRare"
local "TelescopeSpellErrorLocal"
caps "TelescopeSpellErrorCap"

Important

The highlight groups must be set after loading the extension

Usage

Once installed and spell checking is on, you can invoke the picker with the vim command:

:Telescope spell_errors

Or in Lua with:

require("telescope").extensions.spell_errors.spell_errors()

This will open a Telescope window showing all spelling errors in the current buffer. Selecting an entry will move the cursor to the corresponding misspelled word.

About

Telescope picker for spelling mistakes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages