diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 17:02:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 17:02:11 +0800 |
commit | 6dca52b18108d11ab08a8b951eb98115c06b5640 (patch) | |
tree | 3af239bf4a215f3eeae782358735ff6b09459b2b /server/src/matcher/signature.lua | |
parent | 37c2648b16aca6585c63ca352eba2e1d09bf2e91 (diff) | |
download | lua-language-server-6dca52b18108d11ab08a8b951eb98115c06b5640.zip |
参数名
Diffstat (limited to 'server/src/matcher/signature.lua')
-rw-r--r-- | server/src/matcher/signature.lua | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/server/src/matcher/signature.lua b/server/src/matcher/signature.lua index 97b8fc00..60316a5f 100644 --- a/server/src/matcher/signature.lua +++ b/server/src/matcher/signature.lua @@ -38,29 +38,16 @@ local function findDirtyCall(vm, pos) return results end -local function parseCall(call) - local results = hover(call.var, call.source, nil, call.select) - return results[1], results[2] -end - return function (vm, pos) local calls = findDirtyCall(vm, pos) if #calls == 0 then return nil end - local results = {} + local hovers = {} for i, call in ipairs(calls) do - local label, description = parseCall(call) - results[i] = { - label = label, - description = description, - arg = { - label = 'a', - description = '参数说明', - } - } + hovers[i] = hover(call.var, call.source, nil, call.select) end - return results + return hovers end |