From b622ee7be1f09100f7ce0e8098acd2257a42e702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 22 Oct 2019 11:44:58 +0800 Subject: =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=BA=9B=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97=E7=89=87=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/completion.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/src/core/completion.lua') 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 -- cgit v1.2.3