diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 19:17:46 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 19:17:46 +0800 |
commit | 910fc1dae705ce2475c165ec28e20edd9cb89d61 (patch) | |
tree | bc02339f4e5a73a8a393a941058812bd53d510b0 /script-beta/provider | |
parent | a87e0c7cbd8ff44deb009b12efa8c28473db0470 (diff) | |
download | lua-language-server-910fc1dae705ce2475c165ec28e20edd9cb89d61.zip |
允许给 await 设置一个全局的延迟检查器
Diffstat (limited to 'script-beta/provider')
-rw-r--r-- | script-beta/provider/diagnostic.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/script-beta/provider/diagnostic.lua b/script-beta/provider/diagnostic.lua index 86d80034..5285642a 100644 --- a/script-beta/provider/diagnostic.lua +++ b/script-beta/provider/diagnostic.lua @@ -219,13 +219,11 @@ files.watch(function (env, uri) if env == 'remove' then m.clear(uri) elseif env == 'update' then - if not m._start then - return - end await.create(function () - await.delay(function () - return files.globalVersion + await.setDelayer(function () + return files.getVersion(uri) end) + await.delay() m.doDiagnostic(uri) end) end |