summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
authorfesily <fesil@foxmail.com>2024-02-21 15:02:35 +0800
committerfesily <fesil@foxmail.com>2024-02-21 15:02:35 +0800
commitadfac399b1815731de6f12af1fc3e38516969dc7 (patch)
tree71e37068805d188313ccd56ef6fcee1b3a31ef72 /script/workspace
parenteab7e6d84bd2bd937cf2e27e9da11a3c96c45605 (diff)
downloadlua-language-server-adfac399b1815731de6f12af1fc3e38516969dc7.zip
add infer function param type
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/scope.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/workspace/scope.lua b/script/workspace/scope.lua
index 789b5f81..cfdfdc90 100644
--- a/script/workspace/scope.lua
+++ b/script/workspace/scope.lua
@@ -235,11 +235,11 @@ function m.getLinkedScope(uri)
return nil
end
----@param uri uri
+---@param uri? uri
---@return scope
function m.getScope(uri)
- return m.getFolder(uri)
- or m.getLinkedScope(uri)
+ return uri and (m.getFolder(uri)
+ or m.getLinkedScope(uri))
or m.fallback
end