diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-06-27 21:46:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-06-27 21:46:33 +0800 |
commit | 9496ea32f58e8d3ca7455f36ea3f2bfaa270f07d (patch) | |
tree | 03832bbf3c87771f657b9cc8990c8a74e95ffcc0 /server/src/core/hover/function.lua | |
parent | 07c2cec7341676e587fe73f7ecbd361c9eb9a5b9 (diff) | |
download | lua-language-server-9496ea32f58e8d3ca7455f36ea3f2bfaa270f07d.zip |
支持 enum.default
Diffstat (limited to 'server/src/core/hover/function.lua')
-rw-r--r-- | server/src/core/hover/function.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/core/hover/function.lua b/server/src/core/hover/function.lua index b23809f8..52402f83 100644 --- a/server/src/core/hover/function.lua +++ b/server/src/core/hover/function.lua @@ -132,7 +132,11 @@ local function buildEnum(func) first = false strs[#strs+1] = ('\n%s:%s'):format(param:getName(), param:getType()) end - strs[#strs+1] = ('\n | %s'):format(enum) + if option and option.default then + strs[#strs+1] = ('\n |>%s'):format(enum) + else + strs[#strs+1] = ('\n | %s'):format(enum) + end if option and option.comment then strs[#strs+1] = ' -- ' .. option.comment end |