summaryrefslogtreecommitdiff
path: root/server/src/matcher/hover.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-24 11:25:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-24 11:25:46 +0800
commit0f55f1535df9bfc6314dad7d339f5ebeeced1f5d (patch)
tree34a4d7714883b97e6b4f7ec756caeaef3fc5bbc5 /server/src/matcher/hover.lua
parent40a7b97a74bb8fde75ebf5ab5924bc2c80411182 (diff)
downloadlua-language-server-0f55f1535df9bfc6314dad7d339f5ebeeced1f5d.zip
修正require XXX 的hover不正确的BUG
Diffstat (limited to 'server/src/matcher/hover.lua')
-rw-r--r--server/src/matcher/hover.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua
index dc7d40de..774cce92 100644
--- a/server/src/matcher/hover.lua
+++ b/server/src/matcher/hover.lua
@@ -388,7 +388,10 @@ local function getStringHover(result, lsp)
return nil
end
local path = lsp.workspace:relativePathByUri(result.uri)
- return ('[%s](%s)'):format(path:string(), result.uri)
+ return {
+ label = '',
+ description = ('[%s](%s)'):format(path:string(), result.uri),
+ }
end
return function (result, source, lsp, select)