From 24973ecf4ee1696e5354babae744ad3b8262c610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 1 Jul 2021 22:40:06 +0800 Subject: resove #549 --- test/completion/init.lua | 59 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 19 deletions(-) (limited to 'test') 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, + }, +} -- cgit v1.2.3