From d8b0166678abc66c6f66b78fb2ed9b87c682beee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 3 Nov 2020 00:04:40 +0800 Subject: =?UTF-8?q?=E5=8F=AA=E6=9C=89=E6=89=93=E5=BC=80=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=9C=80=E8=A6=81=E8=BF=9B=E8=A1=8C=20Hint=20?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E7=9A=84=E8=AF=8A=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/diagnostics/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script-beta/core') diff --git a/script-beta/core/diagnostics/init.lua b/script-beta/core/diagnostics/init.lua index b00e64ed..bd51ce51 100644 --- a/script-beta/core/diagnostics/init.lua +++ b/script-beta/core/diagnostics/init.lua @@ -41,11 +41,17 @@ return function (uri, response) return nil end + local isOpen = files.isOpen(uri) + for _, name in ipairs(diagList) do local level = define.DiagnosticDefaultSeverity[name] + if not isOpen and level == 'Hint' then + goto CONTINUE + end await.delay() local results = {} check(uri, name, level, results) response(results) + ::CONTINUE:: end end -- cgit v1.2.3