summaryrefslogtreecommitdiff
path: root/server/src/core/document_symbol.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-18 17:54:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-18 17:54:30 +0800
commite8158fd4de7e076ef019493afa33b9c2820de75a (patch)
treeb48cf97556b4bcafdae14119680220be704f94c7 /server/src/core/document_symbol.lua
parent5da8740d528b6f20e969a5b2f5fbd7679e3d267d (diff)
downloadlua-language-server-e8158fd4de7e076ef019493afa33b9c2820de75a.zip
降低文件符号的优先度
Diffstat (limited to 'server/src/core/document_symbol.lua')
-rw-r--r--server/src/core/document_symbol.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua
index ac81277c..39257ba3 100644
--- a/server/src/core/document_symbol.lua
+++ b/server/src/core/document_symbol.lua
@@ -228,6 +228,9 @@ local function packChild(symbols, finish, kind)
t = {}
end
t[#t+1] = symbol
+ if coroutine.isyieldable() then
+ coroutine.yield()
+ end
end
return t
end
@@ -249,6 +252,9 @@ return function (vm)
buildSource(vm, source, used, function (data)
symbols[#symbols+1] = data
end)
+ if coroutine.isyieldable() then
+ coroutine.yield()
+ end
end
local packedSymbols = packSymbols(symbols)