diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-07 15:02:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-07 15:02:11 +0800 |
commit | b8efc4203e6e34036fe858ce49a552ecd9ff957f (patch) | |
tree | 6a8060385798a5c8544939cc662fb9ef34469688 | |
parent | 67f7c1740ef7d0880224b099d3ccc9530d75c14a (diff) | |
download | lua-language-server-b8efc4203e6e34036fe858ce49a552ecd9ff957f.zip |
改一下格式
-rw-r--r-- | server/libs/lua53/basic.lni | 2 | ||||
-rw-r--r-- | server/src/matcher/hover.lua | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/server/libs/lua53/basic.lni b/server/libs/lua53/basic.lni index 163c7fdb..a6412ae9 100644 --- a/server/libs/lua53/basic.lni +++ b/server/libs/lua53/basic.lni @@ -184,7 +184,7 @@ name = 't' type = 'table' [[.returns]] name = 'i' -type = 'number' +type = 'integer' default = 0 [load] diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua index 3a58f8d2..123dcfde 100644 --- a/server/src/matcher/hover.lua +++ b/server/src/matcher/hover.lua @@ -20,7 +20,7 @@ local function buildArgs(lib) strs[#strs+1] = ', ' end if arg.name then - strs[#strs+1] = ('%s:'):format(arg.name) + strs[#strs+1] = ('%s: '):format(arg.name) end strs[#strs+1] = arg.type or 'any' if arg.default then @@ -55,7 +55,7 @@ local function buildReturns(lib) strs[#strs+1] = ', ' end if rtn.name then - strs[#strs+1] = ('%s:'):format(rtn.name) + strs[#strs+1] = ('%s: '):format(rtn.name) end strs[#strs+1] = rtn.type or 'any' if rtn.default then @@ -98,7 +98,7 @@ local function buildEnum(lib) end local strs = {} for name, enums in pairs(container) do - strs[#strs+1] = ('\n%s:%s'):format(name, enums.type or '') + strs[#strs+1] = ('\n%s: %s'):format(name, enums.type or '') for _, enum in ipairs(enums) do if enum.default then strs[#strs+1] = '\n -> ' @@ -132,7 +132,7 @@ local function buildField(lib) end local strs = {} for _, field in ipairs(lib.fields) do - strs[#strs+1] = ('\n%s:%s -- %s'):format(field.field, field.type, field.description or '') + strs[#strs+1] = ('\n%s: %s -- %s'):format(field.field, field.type, field.description or '') end return table.concat(strs) end |