summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-29 20:04:17 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-29 20:04:17 +0800
commit170f587b41b01911f49250b0acc011d00c4e4008 (patch)
treecaa0b10ae66ce97f41997c2219a8015617291457 /script
parent1721f5c185547b8074060a95f526f2f4b630969b (diff)
downloadlua-language-server-170f587b41b01911f49250b0acc011d00c4e4008.zip
hover: shows method
Diffstat (limited to 'script')
-rw-r--r--script/core/hover/label.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/hover/label.lua b/script/core/hover/label.lua
index 3322e0d3..8906d54d 100644
--- a/script/core/hover/label.lua
+++ b/script/core/hover/label.lua
@@ -16,7 +16,7 @@ local function asFunction(source, oop)
local arg = buildArg(source, oop)
local rtn = buildReturn(source)
local lines = {}
- lines[1] = ('function %s(%s)'):format(name or '', arg)
+ lines[1] = ('%s %s(%s)'):format(oop and 'method' or 'function', name or '', arg)
lines[2] = rtn
return table.concat(lines, '\n')
end