summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-21 16:26:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-21 16:26:13 +0800
commit6e447f52bb9cf25730115b3baa7989ff95273471 (patch)
tree9e6683871ef269554ee225b2c672b43a4afacf67 /server/src/method/textDocument
parent49566afd015200c867f673dbe04f97dc241cc4be (diff)
downloadlua-language-server-6e447f52bb9cf25730115b3baa7989ff95273471.zip
#101 signature 额外显示完整的label
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r--server/src/method/textDocument/signatureHelp.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/method/textDocument/signatureHelp.lua b/server/src/method/textDocument/signatureHelp.lua
index 6551464f..e898d32f 100644
--- a/server/src/method/textDocument/signatureHelp.lua
+++ b/server/src/method/textDocument/signatureHelp.lua
@@ -12,15 +12,18 @@ return function (lsp, params)
return
end
- local description = hovers[1].description
+ local hover = hovers[1]
+ local desc = {}
+ desc[#desc+1] = '```lua\n' .. hover.label .. '\n```\n'
+ desc[#desc+1] = hover.description
local active
local signatures = {}
for i, hover in ipairs(hovers) do
local signature = {
- label = hover.label,
+ label = hover.title,
documentation = {
kind = 'markdown',
- value = description,
+ value = table.concat(desc, '\n'),
},
}
if hover.argLabel then