diff options
-rw-r--r-- | script/provider/diagnostic.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index 719ae12a..eeb2294f 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -303,6 +303,11 @@ function m.doDiagnostic(uri, isScopeDiag) end m.cache[uri] = full + if not files.exists(uri) then + m.clear(uri) + return + end + proto.notify('textDocument/publishDiagnostics', { uri = uri, version = version, @@ -345,6 +350,11 @@ function m.resendDiagnostic(uri) return end + if not files.exists(uri) then + m.clear(uri) + return + end + local version = files.getVersion(uri) proto.notify('textDocument/publishDiagnostics', { |