summaryrefslogtreecommitdiff
path: root/server/src/matcher/hover.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-21 10:46:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-21 10:46:09 +0800
commit3e7c5d5725e2a342121b8758a5e364dcf9f6435d (patch)
treec848c5378ff9d5f2fe2a56f96de39f2824899f2d /server/src/matcher/hover.lua
parent9711dcfcafceca6426e650a99f9d580ba6be58c1 (diff)
downloadlua-language-server-3e7c5d5725e2a342121b8758a5e364dcf9f6435d.zip
修正hover的一个bug
Diffstat (limited to 'server/src/matcher/hover.lua')
-rw-r--r--server/src/matcher/hover.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua
index 310d7e84..a2ced9fe 100644
--- a/server/src/matcher/hover.lua
+++ b/server/src/matcher/hover.lua
@@ -252,6 +252,9 @@ local function buildValueReturns(result)
for i, rtn in ipairs(func.returns) do
strs[i] = rtn.type
end
+ if #strs == 0 then
+ strs[1] = 'any'
+ end
return '\n -> ' .. table.concat(strs, ', ')
end