feat(diagnostics): add diagnostics.severity (#1755)
* feat: Support diagnostics severity * fix: Revert Hunk * feat: Supports min/max severity * feat: Supports min/max severity: tidy doc * feat: Supports min/max severity: tidy doc * feat: Supports min/max severity: tidy doc Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
committed by
GitHub
parent
cc18122be1
commit
68a2a0971e
@@ -27,7 +27,7 @@ end
|
||||
local function from_nvim_lsp()
|
||||
local buffer_severity = {}
|
||||
|
||||
for _, diagnostic in ipairs(vim.diagnostic.get()) do
|
||||
for _, diagnostic in ipairs(vim.diagnostic.get(nil, { severity = M.severity })) do
|
||||
local buf = diagnostic.bufnr
|
||||
if vim.api.nvim_buf_is_valid(buf) then
|
||||
local bufname = vim.api.nvim_buf_get_name(buf)
|
||||
@@ -140,6 +140,7 @@ local links = {
|
||||
function M.setup(opts)
|
||||
M.enable = opts.diagnostics.enable
|
||||
M.debounce_delay = opts.diagnostics.debounce_delay
|
||||
M.severity = opts.diagnostics.severity
|
||||
|
||||
if M.enable then
|
||||
log.line("diagnostics", "setup")
|
||||
|
||||
Reference in New Issue
Block a user