Skip to content

Commit 35a59c1

Browse files
authored
feat: Support overriding error severity (#533)
1 parent b386a73 commit 35a59c1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lua/neotest/consumers/diagnostic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ local function init(client)
116116
col = col,
117117
message = error.message,
118118
source = "neotest",
119-
severity = config.diagnostic.severity,
119+
severity = error.severity or config.diagnostic.severity,
120120
}
121121
end
122122
end

lua/neotest/types/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ M.ResultStatus = {
3131
---@class neotest.Error
3232
---@field message string
3333
---@field line? integer
34+
---@field severity? integer Diagnostic severity (see vim.diagnostic.severity)
3435

3536
---@class neotest.Process
3637
---@field output async fun(): string Path to file containing output data

0 commit comments

Comments
 (0)