summaryrefslogtreecommitdiff
path: root/script/provider/diagnostic.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-02-09 13:02:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-02-09 13:02:35 +0800
commitcea9695fd73b6d78093cba1e1eff468a2227ac79 (patch)
treebffc5c5f58ea777a575126f214f5e13999e62486 /script/provider/diagnostic.lua
parent908a2dd6d5a0c959294aee635a9a6c1b6cc23669 (diff)
downloadlua-language-server-cea9695fd73b6d78093cba1e1eff468a2227ac79.zip
fix #946
don't assume the client will cache diagnostics
Diffstat (limited to 'script/provider/diagnostic.lua')
-rw-r--r--script/provider/diagnostic.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 2ca5830d..209e2aaa 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -253,6 +253,11 @@ function m.doDiagnostic(uri, isScopeDiag)
end
end
+ -- always re-sent diagnostics of current file
+ if not isScopeDiag then
+ m.cache[uri] = nil
+ end
+
pushResult()
local lastPushClock = os.clock()