diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/core/hover/function.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/server/src/core/hover/function.lua b/server/src/core/hover/function.lua index 5adeeb7e..6139bd1b 100644 --- a/server/src/core/hover/function.lua +++ b/server/src/core/hover/function.lua @@ -184,7 +184,22 @@ local function getComment(func) if not func then return nil end - return func:getComment() + local comments = {} + local params = func:getEmmyParams() + if params then + for _, param in ipairs(params) do + local option = param:getOption() + if option and option.comment then + comments[#comments+1] = ('+ `%s`*(%s)*: %s'):format(param:getName(), param:getType(), option.comment) + end + end + end + comments[#comments+1] = '\n' + comments[#comments+1] = func:getComment() + if #comments == 0 then + return nil + end + return table.concat(comments, '\n') end local function getOverLoads(name, func, object, select) |