diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-08-11 21:21:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-08-11 21:21:06 +0800 |
commit | efa14d6f2453368d6e2f385c947713ac4ce84bc8 (patch) | |
tree | 8e0975741c5c5c16b86b224101d3e1b919c88e83 /script/core | |
parent | a3c0d6ad25dbab739b10d4fe7019a99d4990f62f (diff) | |
download | lua-language-server-efa14d6f2453368d6e2f385c947713ac4ce84bc8.zip |
add delay in hint
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/hint.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/hint.lua b/script/core/hint.lua index a2864709..fe86c2a3 100644 --- a/script/core/hint.lua +++ b/script/core/hint.lua @@ -3,6 +3,7 @@ local infer = require 'core.infer' local vm = require 'vm' local config = require 'config' local guide = require 'parser.guide' +local await = require 'await' local function typeHint(uri, edits, start, finish) local ast = files.getState(uri) @@ -37,6 +38,7 @@ local function typeHint(uri, edits, start, finish) return end end + await.delay() local view = infer.searchAndViewInfers(source) if view == 'any' or view == 'nil' then @@ -111,6 +113,7 @@ local function paramName(uri, edits, start, finish) if not hasLiteralArgInCall(source) then return end + await.delay() local defs = vm.getDefs(source.node) if not defs then return |