diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-29 20:04:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-29 20:04:17 +0800 |
commit | 170f587b41b01911f49250b0acc011d00c4e4008 (patch) | |
tree | caa0b10ae66ce97f41997c2219a8015617291457 /test | |
parent | 1721f5c185547b8074060a95f526f2f4b630969b (diff) | |
download | lua-language-server-170f587b41b01911f49250b0acc011d00c4e4008.zip |
hover: shows method
Diffstat (limited to 'test')
-rw-r--r-- | test/crossfile/hover.lua | 2 | ||||
-rw-r--r-- | test/hover/init.lua | 12 | ||||
-rw-r--r-- | test/signature/init.lua | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index 97e6218d..d341fa29 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -216,7 +216,7 @@ TEST { }, hover = [[ ```lua -function mt:add(a: any, b: any) +method mt:add(a: any, b: any) ```]] } diff --git a/test/hover/init.lua b/test/hover/init.lua index 8058317d..a09f8583 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -64,7 +64,7 @@ local obj = setmetatable({}, mt) obj:<?init?>(1, '测试') ]] [[ -function mt:init(a: any, b: any, c: any) +method mt:init(a: any, b: any, c: any) ]] --TEST [[ @@ -114,7 +114,7 @@ local obj = setmetatable({}, mt) obj:<?init?>(1, '测试') ]] [[ -function mt:init(a: any, b: any, c: any) +method mt:init(a: any, b: any, c: any) -> table ]] @@ -132,7 +132,7 @@ obj:init(1, '测试') obj.<?init?>(obj, 1, '测试') ]] [[ -function mt:init(a: any, b: any, c: any) +method mt:init(a: any, b: any, c: any) -> table ]] @@ -327,7 +327,7 @@ local t = init() t:<?add?>() ]] [[ -function mt:add(a: any, b: any) +method mt:add(a: any, b: any) ]] TEST [[ @@ -345,7 +345,7 @@ local t = init() t:<?add?>() ]] [[ -function mt:add(a: any, b: any) +method mt:add(a: any, b: any) ]] TEST [[ @@ -485,7 +485,7 @@ function mt:test(a, b) end ]] [[ -function mt:test(a: any, b: any) +method mt:test(a: any, b: any) ]] TEST[[ diff --git a/test/signature/init.lua b/test/signature/init.lua index f1057ae0..1dbe61e8 100644 --- a/test/signature/init.lua +++ b/test/signature/init.lua @@ -64,7 +64,7 @@ end mt:f(<??> ]] -'function mt:f(<!a: any!>)' +'method mt:f(<!a: any!>)' TEST [[ local function x(a, b) @@ -87,7 +87,7 @@ x(1, 2, 3, <??> TEST [[ (''):sub(<??> ]] -'function string:sub(<!i: integer!>, j?: integer)' +'method string:sub(<!i: integer!>, j?: integer)' TEST [[ (''):sub(1)<??> |