From 96b3b67e5153a012a3461e00c5e1a7667d116ad6 Mon Sep 17 00:00:00 2001 From: uhziel Date: Mon, 7 Dec 2020 15:07:57 +0800 Subject: =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87=E9=80=89=E9=A1=B9?= =?UTF-8?q?=20diagnostics.disable=20=E6=9D=A5=E7=A6=81=E7=94=A8=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E9=94=99=E8=AF=AF=20=E6=94=B9=E5=90=8E=EF=BC=8CPROBLE?= =?UTF-8?q?MS=20=E4=B8=AD=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=9D=87=E5=8F=AF=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/provider/diagnostic.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3