diff options
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/command/autoRequire.lua | 2 | ||||
-rw-r--r-- | script/core/completion/completion.lua | 2 | ||||
-rw-r--r-- | script/core/hover/return.lua | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/script/core/command/autoRequire.lua b/script/core/command/autoRequire.lua index 30bd13a1..2f4dfa21 100644 --- a/script/core/command/autoRequire.lua +++ b/script/core/command/autoRequire.lua @@ -137,7 +137,7 @@ return function (data) end local path = furi.decode(target) - local visiblePaths = rpath.getVisiblePath(path) + local visiblePaths = rpath.getVisiblePath(uri, path) if not visiblePaths or #visiblePaths == 0 then return end diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index cbe782cc..401a3583 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -887,7 +887,7 @@ local function collectRequireNames(mode, myUri, literal, source, smark, position goto CONTINUE end local path = workspace.getRelativePath(uri) - local infos = rpath.getVisiblePath(path) + local infos = rpath.getVisiblePath(uri, path) for _, info in ipairs(infos) do if matchKey(literal, info.expect) then if not collect[info.expect] then diff --git a/script/core/hover/return.lua b/script/core/hover/return.lua index 49f9536a..681e9747 100644 --- a/script/core/hover/return.lua +++ b/script/core/hover/return.lua @@ -1,4 +1,5 @@ local infer = require 'core.infer' +local guide = require 'parser.guide' local function getReturnDualByDoc(source) local docs = source.bindDocs @@ -67,7 +68,7 @@ local function asFunction(source) end end if next(infers) or rtn[1] then - local tp = infer.viewInfers(infers) + local tp = infer.viewInfers(guide.getUri(source), infers) if rtn[1].name then line[#line+1] = ('%s%s: %s'):format( rtn[1].name[1], |