summaryrefslogtreecommitdiff
path: root/script/workspace/scope.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-26 22:06:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-26 22:06:00 +0800
commit7b19ab02273c60982c45cd3cac768e9e788ad64d (patch)
tree3152712df1fbb83e0150d6ea5036da56e43ed419 /script/workspace/scope.lua
parent202bc99994db7cf79d04dd56afd1e03743e9b908 (diff)
downloadlua-language-server-7b19ab02273c60982c45cd3cac768e9e788ad64d.zip
library check ignoreDir
Diffstat (limited to 'script/workspace/scope.lua')
-rw-r--r--script/workspace/scope.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/script/workspace/scope.lua b/script/workspace/scope.lua
index 304e875e..ab9c3fb9 100644
--- a/script/workspace/scope.lua
+++ b/script/workspace/scope.lua
@@ -70,6 +70,15 @@ function mt:getLinkedUri(uri)
return nil
end
+---@param uri uri
+---@return uri
+function mt:getRootUri(uri)
+ if self:isChildUri(uri) then
+ return self.uri
+ end
+ return self:getLinkedUri(uri)
+end
+
---@param k string
---@param v any
function mt:set(k, v)