fix(diagnostic): support severity_sort

This commit is contained in:
Gregory Anders
2021-09-17 10:50:25 -06:00
parent f87779a24d
commit 32c0631183
4 changed files with 80 additions and 15 deletions

View File

@@ -195,10 +195,6 @@ function M.on_publish_diagnostics(_, result, ctx, config)
local diagnostics = result.diagnostics
if config then
if vim.F.if_nil(config.severity_sort, false) then
table.sort(diagnostics, function(a, b) return a.severity > b.severity end)
end
for _, opt in pairs(config) do
if type(opt) == 'table' then
if not opt.severity and opt.severity_limit then