summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-13 11:50:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-13 11:50:54 +0800
commit118d331f111c4ea6822b8d01469209aeb7d6dd04 (patch)
tree6b82b4497e90916dbd504acb068bd35c9a19d27a /script
parent8fcde49b035e9d0947035162bacd88a2e2465e19 (diff)
downloadlua-language-server-118d331f111c4ea6822b8d01469209aeb7d6dd04.zip
require hover use relative path
Diffstat (limited to 'script')
-rw-r--r--script/core/hover/description.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index c46b239d..0cb5377f 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -24,11 +24,7 @@ local function collectRequire(mode, literal, uri)
local shows = {}
for i, uri in ipairs(result) do
local searcher = searchers and searchers[uri]
- local path = furi.decode(uri)
- if path:sub(1, #rootPath) == rootPath then
- path = path:sub(#rootPath + 1)
- end
- path = path:gsub('^[/\\]*', '')
+ local path = ws.getRelativePath(uri)
if vm.isMetaFile(uri) then
shows[i] = ('* [[meta]](%s)'):format(uri)
elseif searcher then