diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-30 19:46:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-30 19:46:03 +0800 |
commit | 76af92ca93ff4c9bf4b6fc62bbc49481a17ea044 (patch) | |
tree | ddd3f3ba07551c9b6ce5be4b74618bd47983c7db /script/core | |
parent | b1c20a1f24cc7e17d446b2ac4e4118c36173dc20 (diff) | |
download | lua-language-server-76af92ca93ff4c9bf4b6fc62bbc49481a17ea044.zip |
update
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/definition.lua | 2 | ||||
-rw-r--r-- | script/core/diagnostics/different-requires.lua | 2 | ||||
-rw-r--r-- | script/core/hover/description.lua | 2 | ||||
-rw-r--r-- | script/core/searcher.lua | 2 | ||||
-rw-r--r-- | script/core/type-definition.lua | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/script/core/definition.lua b/script/core/definition.lua index eadae30f..6c6b3df3 100644 --- a/script/core/definition.lua +++ b/script/core/definition.lua @@ -75,7 +75,7 @@ local function checkRequire(source, offset) return nil end if libName == 'require' then - return rpath.findUrisByRequirePath(literal) + return rpath.findUrisByRequirePath(guide.getUri(source), literal) elseif libName == 'dofile' or libName == 'loadfile' then return workspace.findUrisByFilePath(literal) diff --git a/script/core/diagnostics/different-requires.lua b/script/core/diagnostics/different-requires.lua index 3a49ceef..de063c9f 100644 --- a/script/core/diagnostics/different-requires.lua +++ b/script/core/diagnostics/different-requires.lua @@ -21,7 +21,7 @@ return function (uri, callback) return end local literal = arg1[1] - local results = rpath.findUrisByRequirePath(literal) + local results = rpath.findUrisByRequirePath(uri, literal) if not results or #results ~= 1 then return end diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua index 7f34f14d..c46b239d 100644 --- a/script/core/hover/description.lua +++ b/script/core/hover/description.lua @@ -15,7 +15,7 @@ local function collectRequire(mode, literal, uri) local rootPath = ws.getRootUri(uri) or '' local result, searchers if mode == 'require' then - result, searchers = rpath.findUrisByRequirePath(literal) + result, searchers = rpath.findUrisByRequirePath(uri, literal) elseif mode == 'dofile' or mode == 'loadfile' then result = ws.findUrisByFilePath(literal) diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 68852062..6c832155 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -796,7 +796,7 @@ function m.searchRefsByID(status, suri, expect, mode) if not requireName then return end - local uris = rpath.findUrisByRequirePath(requireName) + local uris = rpath.findUrisByRequirePath(suri, requireName) footprint(status, 'require:', requireName) for i = 1, #uris do local ruri = uris[i] diff --git a/script/core/type-definition.lua b/script/core/type-definition.lua index e9cf3e47..1f021fb3 100644 --- a/script/core/type-definition.lua +++ b/script/core/type-definition.lua @@ -76,7 +76,7 @@ local function checkRequire(source, offset) return nil end if libName == 'require' then - return rpath.findUrisByRequirePath(literal) + return rpath.findUrisByRequirePath(guide.getUri(source), literal) elseif libName == 'dofile' or libName == 'loadfile' then return workspace.findUrisByFilePath(literal) |