diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 19:09:47 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 19:09:47 +0800 |
commit | a87e0c7cbd8ff44deb009b12efa8c28473db0470 (patch) | |
tree | 7637a3db4a65444b9717c12be9e9c7fa96c7e92e /script-beta/vm/eachDef.lua | |
parent | 674892abc53ad6752326135c8aaf60073f80b632 (diff) | |
download | lua-language-server-a87e0c7cbd8ff44deb009b12efa8c28473db0470.zip |
添加delay,保证自动完成的优先度最高
Diffstat (limited to 'script-beta/vm/eachDef.lua')
-rw-r--r-- | script-beta/vm/eachDef.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/vm/eachDef.lua b/script-beta/vm/eachDef.lua index 2b30c0cd..7ab65581 100644 --- a/script-beta/vm/eachDef.lua +++ b/script-beta/vm/eachDef.lua @@ -3,6 +3,7 @@ local guide = require 'parser.guide' local ws = require 'workspace' local files = require 'files' local util = require 'utility' +local await = require 'await' local m = {} @@ -24,6 +25,8 @@ function m.eachDef(source, results) return results end + await.delay() + local clock = os.clock() local myResults, count = guide.requestDefinition(source, vm.interface) if DEVELOP and os.clock() - clock > 0.1 then |