summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-30 10:41:14 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-30 10:41:14 +0800
commit6f30515d360b3eb5edcda9c2233edb11f238d870 (patch)
treeffb5f1a3ba63306ac05a3b895ee6ff6f0f6848a0
parentbf19cd77d0104a7d181c4fd3331f869c2cd4cea3 (diff)
downloadlua-language-server-6f30515d360b3eb5edcda9c2233edb11f238d870.zip
clear diagnostic when closing library file
-rw-r--r--script/provider/diagnostic.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index bd8be8b1..8614ef78 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -302,7 +302,8 @@ files.watch(function (ev, uri)
elseif ev == 'open' then
m.doDiagnostic(uri)
elseif ev == 'close' then
- if files.isLibrary(uri) then
+ if files.isLibrary(uri)
+ or ws.isIgnored(uri) then
m.clear(uri)
end
end