summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-08-01 14:58:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-08-01 14:58:59 +0800
commitcf45170e1003ab9bb149636725216f6fcf3f09a0 (patch)
tree5d7ec675eb9433adf9d91ba5fbcf0a12feca31f6 /server/src/core
parent143937e84d8f6a8b85cbc8a39b542ab2dab2ee4d (diff)
downloadlua-language-server-cf45170e1003ab9bb149636725216f6fcf3f09a0.zip
支持新的 Local Attributes
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/hover/hover.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/core/hover/hover.lua b/server/src/core/hover/hover.lua
index d78b8add..dbbafc30 100644
--- a/server/src/core/hover/hover.lua
+++ b/server/src/core/hover/hover.lua
@@ -208,13 +208,15 @@ local function getValueHover(source, name, value, lib)
local loc = source:bindLocal()
if loc.tags then
local mark = {}
+ local tagBufs = {}
for _, tag in ipairs(loc.tags) do
local tagName = tag[1]
if not mark[tagName] then
mark[tagName] = true
- tp = ('%s <%s>'):format(tp, tagName)
+ tagBufs[#tagBufs+1] = ('<%s>'):format(tagName)
end
end
+ name = name .. ' ' .. table.concat(tagBufs, ' ')
end
tips[#tips+1] = loc:getComment()
elseif source:get 'global' then