diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-06-28 15:01:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-06-28 15:01:16 +0800 |
commit | daee93fb17e8f206e63ab8573566762011a3f1cd (patch) | |
tree | 899636477d8afb30b7dbfe995ef9fa8a76239919 /server/src/core/hover/function.lua | |
parent | f6a6e9f9d36d34c542c721db41a4e9770bcebcf7 (diff) | |
download | lua-language-server-daee93fb17e8f206e63ab8573566762011a3f1cd.zip |
修改enum的语法
Diffstat (limited to 'server/src/core/hover/function.lua')
-rw-r--r-- | server/src/core/hover/function.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/core/hover/function.lua b/server/src/core/hover/function.lua index b3bbb428..620eb054 100644 --- a/server/src/core/hover/function.lua +++ b/server/src/core/hover/function.lua @@ -129,18 +129,18 @@ local function buildEnum(func) local strs = {} for _, param in ipairs(params) do local first = true - param:eachEnum(function (enum, option) + param:eachEnum(function (enum) if first then first = false strs[#strs+1] = ('\n%s: %s'):format(param:getName(), param:getType()) end - if option and option.default then - strs[#strs+1] = ('\n |>%s'):format(enum) + if enum.default then + strs[#strs+1] = ('\n |>%s'):format(enum[1]) else - strs[#strs+1] = ('\n | %s'):format(enum) + strs[#strs+1] = ('\n | %s'):format(enum[1]) end - if option and option.comment then - strs[#strs+1] = ' -- ' .. option.comment + if enum.comment then + strs[#strs+1] = ' -- ' .. enum.comment end end) end |