diff options
Diffstat (limited to 'script/workspace')
-rw-r--r-- | script/workspace/loading.lua | 2 | ||||
-rw-r--r-- | script/workspace/workspace.lua | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/script/workspace/loading.lua b/script/workspace/loading.lua index cbcfa567..7730946b 100644 --- a/script/workspace/loading.lua +++ b/script/workspace/loading.lua @@ -159,7 +159,7 @@ local m = {} function m.create(scp) local loading = setmetatable({ scp = scp, - _bar = progress.create(lang.script('WORKSPACE_LOADING', scp.uri)), + _bar = progress.create(scp, lang.script('WORKSPACE_LOADING', scp.uri)), _stash = {}, _cache = {}, }, mt) diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index 4baacc24..999f2e11 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -455,6 +455,11 @@ function m.getScope(uri) or scope.fallback end +---@return scope +function m.getFirstScope() + return m.folders[1] or scope.fallback +end + ---等待工作目录加载完成 ---@async function m.awaitReady(uri) |