summaryrefslogtreecommitdiff
path: root/script/vm/infer.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-03-11 02:03:30 +0800
committersumneko <sumneko@hotmail.com>2022-03-11 02:03:30 +0800
commit9512eec020d1ee186d3fe684cd9c2493c5672fc7 (patch)
treeadcc0276bd04058a4ab83f8705900cb292cead25 /script/vm/infer.lua
parent54b1e1123f242e5b5ffe8cc5ca51afe3cf18b4a1 (diff)
downloadlua-language-server-9512eec020d1ee186d3fe684cd9c2493c5672fc7.zip
update
Diffstat (limited to 'script/vm/infer.lua')
-rw-r--r--script/vm/infer.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/script/vm/infer.lua b/script/vm/infer.lua
index bcbd2935..d5ab2d46 100644
--- a/script/vm/infer.lua
+++ b/script/vm/infer.lua
@@ -49,7 +49,15 @@ local viewNodeMap = util.switch()
end)
: case 'doc.type.name'
: call(function (source, options)
- return source[1]
+ if source.signs then
+ local buf = {}
+ for i, sign in ipairs(source.signs) do
+ buf[i] = m.viewType(sign)
+ end
+ return ('%s<%s>'):format(source[1], table.concat(buf, ', '))
+ else
+ return source[1]
+ end
end)
: case 'doc.type.array'
: call(function (source, options)