Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 1.29 KB

README.md

File metadata and controls

45 lines (37 loc) · 1.29 KB

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