diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-11 19:47:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-11 19:47:36 +0800 |
commit | 0e4da86a34a4162b2d094390e1dc3a6d89f3e7e9 (patch) | |
tree | 7d20fe9231ac8c0532886bb713f0188c285e9c79 /script-beta/provider | |
parent | f6af139891a40eaadc8197202b198a3965a05c3b (diff) | |
download | lua-language-server-0e4da86a34a4162b2d094390e1dc3a6d89f3e7e9.zip |
暂存
Diffstat (limited to 'script-beta/provider')
-rw-r--r-- | script-beta/provider/diagnostic.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/script-beta/provider/diagnostic.lua b/script-beta/provider/diagnostic.lua index 87b8cb26..92aa01c2 100644 --- a/script-beta/provider/diagnostic.lua +++ b/script-beta/provider/diagnostic.lua @@ -179,7 +179,7 @@ function m.refresh(uri) return files.globalVersion end) if uri then - m.doDiagnostic(uri, true, true) + m.doDiagnostic(uri) end if not m._start then return @@ -189,7 +189,7 @@ function m.refresh(uri) end) local clock = os.clock() if uri then - m.doDiagnostic(uri, true, false) + m.doDiagnostic(uri) end for destUri in files.eachFile() do if destUri ~= uri then @@ -219,7 +219,12 @@ files.watch(function (env, uri) if env == 'remove' then m.clear(uri) elseif env == 'update' then - m.doDiagnostic(uri) + await.create(function () + await.delay(function () + return files.globalVersion + end) + m.doDiagnostic(uri) + end) end end) |