summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script-beta/core/diagnostics/init.lua6
1 files changed, 6 insertions, 0 deletions
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