summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-09 17:34:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-09 17:34:04 +0800
commite5a2673afdc7345b2c5e914a9797d7198d2ccdfd (patch)
tree19d30418dd6612adaf493c46b83c7ee26a55e438
parentd1ca1c8add2b122eb9b558d3c185f34de001e971 (diff)
downloadlua-language-server-e5a2673afdc7345b2c5e914a9797d7198d2ccdfd.zip
处理路径大小写问题,并排个序
-rw-r--r--script-beta/core/hover/description.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script-beta/core/hover/description.lua b/script-beta/core/hover/description.lua
index 1a6f19ca..ae33e133 100644
--- a/script-beta/core/hover/description.lua
+++ b/script-beta/core/hover/description.lua
@@ -25,12 +25,15 @@ local function asString(source)
end
if result and #result > 0 then
for i, uri in ipairs(result) do
+ uri = files.getOriginUri(uri)
local path = furi.decode(uri)
if files.eq(path:sub(1, #ws.path), ws.path) then
- path = path:sub(#ws.path + 1):gsub('^[/\\]*', '')
+ path = path:sub(#ws.path + 1)
end
+ path = path:gsub('^[/\\]*', '')
result[i] = ('[%s](%s)'):format(path, uri)
end
+ table.sort(result)
return table.concat(result, '\n')
end
end