Skip to content

Commit cea9695

Browse files
committed
fix #946
don't assume the client will cache diagnostics
1 parent 908a2dd commit cea9695

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* `FIX` [#941](https://github.com/sumneko/lua-language-server/issues/941)
88
* `FIX` [#941](https://github.com/sumneko/lua-language-server/issues/942)
99
* `FIX` [#943](https://github.com/sumneko/lua-language-server/issues/943)
10+
* `FIX` [#946](https://github.com/sumneko/lua-language-server/issues/946)
1011

1112
## 2.6.3
1213
`2022-1-25`

script/provider/diagnostic.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ function m.doDiagnostic(uri, isScopeDiag)
253253
end
254254
end
255255

256+
-- always re-sent diagnostics of current file
257+
if not isScopeDiag then
258+
m.cache[uri] = nil
259+
end
260+
256261
pushResult()
257262

258263
local lastPushClock = os.clock()

0 commit comments

Comments
 (0)