summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/provider/diagnostic.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 8614ef78..b155a591 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -141,7 +141,9 @@ function m.syntaxErrors(uri, ast)
local results = {}
for _, err in ipairs(ast.errs) do
- results[#results+1] = buildSyntaxError(uri, err)
+ if not config.config.diagnostics.disable[err.type:lower():gsub('_', '-')] then
+ results[#results+1] = buildSyntaxError(uri, err)
+ end
end
return results