Skip to content

Commit 118d331

Browse files
committed
require hover use relative path
1 parent 8fcde49 commit 118d331

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

script/core/hover/description.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ local function collectRequire(mode, literal, uri)
2424
local shows = {}
2525
for i, uri in ipairs(result) do
2626
local searcher = searchers and searchers[uri]
27-
local path = furi.decode(uri)
28-
if path:sub(1, #rootPath) == rootPath then
29-
path = path:sub(#rootPath + 1)
30-
end
31-
path = path:gsub('^[/\\]*', '')
27+
local path = ws.getRelativePath(uri)
3228
if vm.isMetaFile(uri) then
3329
shows[i] = ('* [[meta]](%s)'):format(uri)
3430
elseif searcher then

0 commit comments

Comments
 (0)