summaryrefslogtreecommitdiff
path: root/server/src/core/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-22 11:44:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-22 11:44:58 +0800
commitb622ee7be1f09100f7ce0e8098acd2257a42e702 (patch)
tree1b3d1c7ba1c9d23a0bd5e9373525f006ec2c8297 /server/src/core/completion.lua
parent47cfc4608a7f26a0e635ea6b33c3fa3f3fca3883 (diff)
downloadlua-language-server-b622ee7be1f09100f7ce0e8098acd2257a42e702.zip
调整一些关键字片段
Diffstat (limited to 'server/src/core/completion.lua')
-rw-r--r--server/src/core/completion.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index 23ba5f1b..756f136b 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -398,7 +398,9 @@ local function searchKeyWords(vm, source, word, callback)
for _, key in ipairs(KEYS) do
if matchKey(word, key) then
if snippet.key[key] then
- if snipType ~= 'Replace' then
+ if snipType ~= 'Replace'
+ or key == 'local'
+ or key == 'return' then
callback(key, nil, CompletionItemKind.Keyword)
end
if snipType ~= 'Disable' then