summaryrefslogtreecommitdiff
path: root/test/completion/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion/init.lua')
-rw-r--r--test/completion/init.lua59
1 files changed, 40 insertions, 19 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua
index d55d1c9a..0f96949d 100644
--- a/test/completion/init.lua
+++ b/test/completion/init.lua
@@ -2548,22 +2548,43 @@ end
]]
(EXISTS)
---config.set('Lua.completion.callSnippet', 'Disable')
---
---TEST [[
---GGG = 1
---GGG = function ()
---end
---
---GGG$
---]]
---{
--- {
--- label = 'GGG = 1',
--- kind = define.CompletionItemKind.Variable,
--- },
--- {
--- label = 'GGG()',
--- kind = define.CompletionItemKind.Function,
--- },
---}
+config.set('Lua.completion.callSnippet', 'Disable')
+
+TEST [[
+GGG = 1
+GGG = function ()
+end
+
+GGG$
+]]
+{
+ {
+ label = 'GGG',
+ kind = define.CompletionItemKind.Enum,
+ },
+ {
+ label = 'GGG()',
+ kind = define.CompletionItemKind.Function,
+ },
+}
+
+TEST [[
+---@class C
+---@field GGG number
+local t = {}
+
+t.GGG = function ()
+end
+
+t.GGG$
+]]
+{
+ {
+ label = 't.GGG',
+ kind = define.CompletionItemKind.Enum,
+ },
+ {
+ label = 't.GGG()',
+ kind = define.CompletionItemKind.Function,
+ },
+}