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/eachRef.lua | |
parent | 674892abc53ad6752326135c8aaf60073f80b632 (diff) | |
download | lua-language-server-a87e0c7cbd8ff44deb009b12efa8c28473db0470.zip |
添加delay,保证自动完成的优先度最高
Diffstat (limited to 'script-beta/vm/eachRef.lua')
-rw-r--r-- | script-beta/vm/eachRef.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/vm/eachRef.lua b/script-beta/vm/eachRef.lua index d372b03b..616dccdd 100644 --- a/script-beta/vm/eachRef.lua +++ b/script-beta/vm/eachRef.lua @@ -1,6 +1,7 @@ local vm = require 'vm.vm' local guide = require 'parser.guide' local util = require 'utility' +local await = require 'await' local function getRefs(source, results) results = results or {} @@ -9,6 +10,8 @@ local function getRefs(source, results) return results end + await.delay() + local clock = os.clock() local myResults, count = guide.requestReference(source, vm.interface) if DEVELOP and os.clock() - clock > 0.1 then |