diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-24 22:16:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-24 22:16:17 +0800 |
commit | b6a58d0912d6cb015c621d2ce32d701ef6e7500e (patch) | |
tree | 6492047bb9cf877987b10c629aa062fa92365b8f /test/completion/init.lua | |
parent | 95688433e4b7aa46257b4db557db38d81f0d6b04 (diff) | |
download | lua-language-server-b6a58d0912d6cb015c621d2ce32d701ef6e7500e.zip |
stash
Diffstat (limited to 'test/completion/init.lua')
-rw-r--r-- | test/completion/init.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index 80a4aae5..4a04ecc5 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2519,3 +2519,23 @@ zzzz$ insertText = 'zzzz(${1:a: any}, ${2:b: any})', }, } +Cared['insertText'] = false + +TEST [[ +--- @diagnostic disable: unused-local +--- @class Test2 +--- @field world integer +local Test2 = {} + +--- @type Test2 +local tdirect +--- @type Test2[] +local tarray + +-- Direct inference +local b = tdirect -- type . here, shows "world" + +-- Inferred by index +local c = tarray[1].$ -- type . here, no auto completion +]] +(EXISTS) |