diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-02 17:40:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-02 17:40:56 +0800 |
commit | 63510ae7469aa1cf09da2c356a9feb2ce4be4cd7 (patch) | |
tree | 4edb3a86e5ec2e9d2d4023680214f5c8725ec8b0 /script/provider | |
parent | 9e57cf361853306a306b336198a4b60c1a7dea98 (diff) | |
download | lua-language-server-63510ae7469aa1cf09da2c356a9feb2ce4be4cd7.zip |
fix diag results remains
Diffstat (limited to 'script/provider')
-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', { |