summaryrefslogtreecommitdiff
path: root/script/core/document-symbol.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/document-symbol.lua')
-rw-r--r--script/core/document-symbol.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/core/document-symbol.lua b/script/core/document-symbol.lua
index cfabedab..07794e60 100644
--- a/script/core/document-symbol.lua
+++ b/script/core/document-symbol.lua
@@ -219,6 +219,7 @@ local function buildAnonymousFunction(source, text, used, symbols)
}
end
+---@async
local function buildSource(source, text, used, symbols)
if source.type == 'local'
or source.type == 'setlocal'
@@ -234,6 +235,7 @@ local function buildSource(source, text, used, symbols)
end
end
+---@async
local function makeSymbol(uri)
local ast = files.getState(uri)
local text = files.getText(uri)
@@ -243,7 +245,7 @@ local function makeSymbol(uri)
local symbols = {}
local used = {}
- guide.eachSource(ast.ast, function (source)
+ guide.eachSource(ast.ast, function (source) ---@async
buildSource(source, text, used, symbols)
end)
@@ -279,6 +281,7 @@ local function packChild(symbols)
return root
end
+---@async
local function packSymbols(symbols)
await.delay()
table.sort(symbols, function (a, b)
@@ -291,6 +294,7 @@ local function packSymbols(symbols)
return packChild(symbols)
end
+---@async
return function (uri)
local symbols = makeSymbol(uri)
if not symbols then