diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-05 14:11:18 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-05 14:11:18 +0800 |
commit | 1a3ff586501cc6f8bd29f53664b399c1c976f269 (patch) | |
tree | abd6037f6f590f82257808e18e5dec4a1086dd55 /server/src/method/textDocument | |
parent | c85e32e8e124ab70b1286349469fb838e06b06c9 (diff) | |
download | lua-language-server-1a3ff586501cc6f8bd29f53664b399c1c976f269.zip |
修正初始打开的文件没有符号的问你
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r-- | server/src/method/textDocument/documentSymbol.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/method/textDocument/documentSymbol.lua b/server/src/method/textDocument/documentSymbol.lua index 915c0126..664041e6 100644 --- a/server/src/method/textDocument/documentSymbol.lua +++ b/server/src/method/textDocument/documentSymbol.lua @@ -41,10 +41,11 @@ return function (lsp, params) end return function (response) + local clock = os.clock() timerCache[uri] = ac.loop(0.1, function (t) local vm, lines = lsp:getVM(uri) if not vm then - if not lsp:isWaitingCompile() then + if os.clock() - clock > 10 then t:remove() timerCache[uri] = nil response(nil) @@ -67,5 +68,6 @@ return function (lsp, params) response(symbols) end) + timerCache[uri]:onTimer() end end |