diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-09 10:33:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-09 10:33:10 +0800 |
commit | 9e40b80887ebf4b9284127e7e898387ffc1bf9c8 (patch) | |
tree | eda976b74bd0d30ddbd0c76e3092cbe8063d0f7b /test-beta/completion/init.lua | |
parent | 1521c242ee21c5a8af993fa1d52ef5ac3e382767 (diff) | |
download | lua-language-server-9e40b80887ebf4b9284127e7e898387ffc1bf9c8.zip |
自动完成全局变量时检查当前可见的同名局部变量
Diffstat (limited to 'test-beta/completion/init.lua')
-rw-r--r-- | test-beta/completion/init.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test-beta/completion/init.lua b/test-beta/completion/init.lua index de22e3f4..c69e69fe 100644 --- a/test-beta/completion/init.lua +++ b/test-beta/completion/init.lua @@ -158,6 +158,32 @@ ass$ } TEST [[ +local assert = 1 +ass$ +]] +{ + { + label = 'assert', + kind = define.CompletionItemKind.Variable, + }, +} + +TEST [[ +local assert = 1 +_G.ass$ +]] +{ + { + label = 'assert', + kind = define.CompletionItemKind.Function, + }, + { + label = 'assert()', + kind = define.CompletionItemKind.Snippet, + }, +} + +TEST [[ local function ffff(a, b) end ff$ |