diff options
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/diagnostics/init.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua index 510b57ea..15884758 100644 --- a/script/core/diagnostics/init.lua +++ b/script/core/diagnostics/init.lua @@ -22,14 +22,10 @@ local function check(uri, name, results) end local level = config.config.diagnostics.severity[name] or define.DiagnosticDefaultSeverity[name] - if not files.isOpen(uri) then - if level == 'Hint' then - return - end - -- TODO - if name == 'undefined-field' then - return - end + + local neededFileStatus = define.DiagnosticDefaultNeededFileStatus[name] + if neededFileStatus == 'Opened' and not files.isOpen(uri) then + return end local severity = define.DiagnosticSeverity[level] local clock = os.clock() |