Skip to content

Commit aa6a704

Browse files
committed
fix: ensure diagnostics are correctly sorted
1 parent 79132a9 commit aa6a704

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lua/tiny-inline-diagnostic/diagnostic.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ end
8989
local function filter_diagnostics(opts, event, diagnostics)
9090
local filtered = filter_by_severity(opts, diagnostics)
9191

92+
table.sort(filtered, function(a, b)
93+
return a.severity < b.severity
94+
end)
95+
9296
if not opts.options.multilines.enabled then
9397
return M.filter_diags_under_cursor(opts, event.buf, filtered)
9498
end

lua/tiny-inline-diagnostic/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ local default_config = {
2828
use_icons_from_diagnostic = false,
2929
throttle = 20,
3030
softwrap = 30,
31-
multiple_diag_under_cursor = false,
3231
multilines = {
3332
enabled = false,
3433
always_show = false,

0 commit comments

Comments
 (0)