diff options
author | unknown <sumnekosun@intranet.123u.com> | 2019-04-01 18:55:51 +0800 |
---|---|---|
committer | unknown <sumnekosun@intranet.123u.com> | 2019-04-01 18:55:51 +0800 |
commit | c0708092a2c256d61c2cdbc3217a588bb86757ca (patch) | |
tree | bcdf65d29ec7f3b950090d2f0102d22eefbac4e1 /server/src/method/textDocument/definition.lua | |
parent | a66a4c54ef9421f0ba5683cd727a40197078d724 (diff) | |
download | lua-language-server-c0708092a2c256d61c2cdbc3217a588bb86757ca.zip |
定义与引用会进行更多的尝试
Diffstat (limited to 'server/src/method/textDocument/definition.lua')
-rw-r--r-- | server/src/method/textDocument/definition.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua index d9c32b36..c2880f7e 100644 --- a/server/src/method/textDocument/definition.lua +++ b/server/src/method/textDocument/definition.lua @@ -75,13 +75,15 @@ return function (lsp, params) end return function (response) LastTask = ac.loop(0.1, function () + local result = findResult(lsp, params) + if result then + response(result) + end if lsp:isWaitingCompile() then return end LastTask:remove() LastTask = nil - local result = findResult(lsp, params) - response(result) end) end end |