Skip to content

mizlan/delimited.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

delimited.nvim

Highlight the exact range of a diagnostic!

demo.mp4

Use as a drop-in replacement for vim.diagnostic.goto_next and vim.diagnostic.goto_prev:

vim.keymap.set("n", "[d", require("delimited").goto_prev, bufopts)
vim.keymap.set("n", "]d", require("delimited").goto_next, bufopts)
vim.keymap.set("n", "[D", function()
    require("delimited").goto_prev({ severity = vim.diagnostic.severity.ERROR })
end, bufopts)
vim.keymap.set("n", "]D", function()
    require("delimited").goto_next({ severity = vim.diagnostic.severity.ERROR })
end, bufopts)

You may configure pre- and post-hooks (note that setup() is needed if you'd like to create the default highlights):

{
    "mizlan/delimited.nvim",
    opts = {
        pre = function()
            -- do something here
        end,
        post = function()
            -- do something here
        end,
    },
},

Highlights

Group Default
DelimitedError DiagnosticVirtualTextError
DelimitedWarn DiagnosticVirtualTextWarn
DelimitedInfo DiagnosticVirtualTextInfo
DelimitedHint DiagnosticVirtualTextHint

About

A tidy, more informative goto_{next,prev} for Neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages