summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-01-23 04:57:04 +0800
committersumneko <sumneko@hotmail.com>2022-01-23 04:57:04 +0800
commitc4dd7789e723f28976dd5edd2e32e374ef937883 (patch)
treedbdbaac14b8855b3b6fff02ec7cf2fddd333848c /script/workspace
parent3ac7e1102fa6bb6f71c55b3b69e9a7f8d898db98 (diff)
downloadlua-language-server-c4dd7789e723f28976dd5edd2e32e374ef937883.zip
cleanup
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/require-path.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/script/workspace/require-path.lua b/script/workspace/require-path.lua
index 98e9e61c..223d6ada 100644
--- a/script/workspace/require-path.lua
+++ b/script/workspace/require-path.lua
@@ -43,15 +43,12 @@ function m.getVisiblePath(suri, path)
local strict = config.get(suri, 'Lua.runtime.pathStrict')
path = workspace.normalize(path)
local uri = furi.encode(path)
- local libraryPath = furi.decode(files.getLibraryUri(uri))
+ local libraryPath = furi.decode(files.getLibraryUri(suri, uri))
local scp = scope.getScope(suri)
local cache = scp:get('visiblePath') or scp:set('visiblePath', {})
if not cache[path] then
local result = {}
cache[path] = result
- if libraryPath then
- libraryPath = libraryPath:gsub('^[/\\]+', '')
- end
for _, searcher in ipairs(searchers) do
local isAbsolute = searcher:match '^[/\\]'
or searcher:match '^%a+%:'