diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-16 15:19:21 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-16 15:19:21 +0800 |
commit | eb57da9aa226890bf40d6187811227f5150fb1b1 (patch) | |
tree | 19a9151095a9b5305ef1c44773ee3eb6e77f3473 /server/test/completion | |
parent | 685f167e1d46a15afde902c68a1fccd9e720b407 (diff) | |
download | lua-language-server-eb57da9aa226890bf40d6187811227f5150fb1b1.zip |
修改自动完成策略,如果有多个结果,则将完全一致的放在前面
Diffstat (limited to 'server/test/completion')
-rw-r--r-- | server/test/completion/init.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index e26000b8..f4b459a0 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -94,6 +94,10 @@ zabcde@ ]] { { + label = 'zabcde', + kind = CompletionItemKind.Variable, + }, + { label = 'zabcdefg', kind = CompletionItemKind.Variable, } @@ -478,3 +482,26 @@ local t = { t @. ]] (nil) + +TEST [[ +local xxxx +xxxx@ +]] +(nil) + +TEST [[ +local xxxx +local XXXX +xxxx@ +]] + +{ + { + label = 'xxxx', + kind = CompletionItemKind.Variable, + }, + { + label = 'XXXX', + kind = CompletionItemKind.Variable, + } +} |