summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-30 18:02:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-30 18:02:31 +0800
commit4a9ab5b1ae9889e9732b53ad8cdf3b6db5394c3b (patch)
tree935934fdb69c1e94209e79827474b7a145c28b7b /script/workspace
parentbb3f84633b01afb0a2f719645f8176f491fb7694 (diff)
downloadlua-language-server-4a9ab5b1ae9889e9732b53ad8cdf3b6db5394c3b.zip
command `lua.exportDocument`
finish #1833
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/workspace.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index aabe0c78..7031064b 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -536,11 +536,26 @@ function m.awaitReady(uri)
end
---@param uri uri
+---@return boolean
function m.isReady(uri)
local scp = scope.getScope(uri)
return scp:get('ready') == true
end
+---@return boolean
+function m.isAllReady()
+ local scp = scope.fallback
+ if not scp:get 'ready' then
+ return false
+ end
+ for _, folder in ipairs(scope.folders) do
+ if not folder:get 'ready' then
+ return false
+ end
+ end
+ return true
+end
+
function m.getLoadingProcess(uri)
local scp = scope.getScope(uri)
---@type workspace.loading