Skip to content

Commit

Permalink
fix: only filter msg if sev is hardcoded
Browse files Browse the repository at this point in the history
Fixes previous breaking change that prevented nvim severity tables from
working, such as:
require("trouble").setup({
	severity = { min = vim.diagnostic.severity.INFO },
})

Optimal fix might be a less naive way of filtering severity, but I'd
leave that for somebody that cares about this feature.
  • Loading branch information
Willem Jan Noort committed Aug 21, 2023
1 parent 40aad00 commit ac68f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/providers/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function M.diagnostics(_, buf, cb, options)
end

local messages = {}
if options.severity ~= nil then
if options.severity[options.severity] then
table.insert(messages, { text = "filter:", group = "Information" })
table.insert(messages, { text = severity[options.severity], group = "Sign" .. util.severity[options.severity] })
end
Expand Down

0 comments on commit ac68f44

Please sign in to comment.