summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-03 15:24:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-03 15:24:32 +0800
commit213f5176ff3125feab1e743ef57abba0e18a44a5 (patch)
treeebf8d225bfd3bc041e3614ce546a85a7bf833492 /test/completion
parentb04dee92ee20fb4548c5f941af3ea40603828fac (diff)
downloadlua-language-server-213f5176ff3125feab1e743ef57abba0e18a44a5.zip
supports completion with table field of function
resolve #1533
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 2438618e..dab31c31 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -3980,3 +3980,19 @@ TEST [[
}
},
}
+
+TEST [[
+---@class A
+---@field f fun(x: string): string
+
+---@type A
+local t = {
+ f = <??>
+}
+]]
+{
+ {
+ label = 'fun(x: string):string',
+ kind = define.CompletionItemKind.Function,
+ }
+}