summaryrefslogtreecommitdiff
path: root/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-26 01:31:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-26 01:31:45 +0800
commitc78fbf09aa4406db905a8a0e6dd5731871f2c262 (patch)
tree50d1c7005f1ab879608a5738d626370e1a01ac70 /test/crossfile
parented64703ef9fec2b1c6736a0deb68bd567875a654 (diff)
downloadlua-language-server-c78fbf09aa4406db905a8a0e6dd5731871f2c262.zip
#1207
return names and parentheses can be used in `DocFunction`
Diffstat (limited to 'test/crossfile')
-rw-r--r--test/crossfile/hover.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index b9ffd59b..c6991d8f 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -1158,3 +1158,26 @@ TEST {
---
The color of your awesome apple!]]
}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ ---@type fun(x: number, y: number, ...: number):(x: number, y: number, ...: number)
+ local <?f?>
+ ]]
+ },
+ hover = [[
+```lua
+local f: fun(x: number, y: number, ...number):(x: number, y: number, ...number)
+```
+
+---
+
+```lua
+function f(x: number, y: number, ...: number)
+ -> x: number
+ 2. y: number
+ 3. ...number
+```]]
+}