diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-30 10:15:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-30 10:15:14 +0800 |
commit | b40bd51dea3d6fb603cc437c17041938e985d29f (patch) | |
tree | 88602be147f429f1e4d912b19693e0cadf6b99ff | |
parent | d436de5f3b1ea67cac6006a2838c95d7b4fa5ac5 (diff) | |
download | lua-language-server-b40bd51dea3d6fb603cc437c17041938e985d29f.zip |
clear diagnostic when closing library file
-rw-r--r-- | script/provider/diagnostic.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index aa804faf..496b06fc 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -297,6 +297,10 @@ files.watch(function (ev, uri) m.refresh(uri) elseif ev == 'open' then m.doDiagnostic(uri) + elseif ev == 'close' then + if files.isLibrary(uri) then + m.clear(uri) + end end end) |