From c74a40802791169b2bc14716e2e8a81fd476f11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 4 Apr 2022 16:18:03 +0800 Subject: #992 using `Snippet` only when `callSnippet` is `Both` --- script/core/completion/completion.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'script/core/completion/completion.lua') diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index d751b727..87542422 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -243,7 +243,9 @@ local function buildFunction(results, source, value, oop, data) if snipType == 'Both' or snipType == 'Replace' then local snipData = util.deepCopy(data) - snipData.kind = define.CompletionItemKind.Snippet + snipData.kind = snipType == 'Both' + and define.CompletionItemKind.Snippet + or data.kind snipData.insertText = buildFunctionSnip(source, value, oop) snipData.insertTextFormat = 2 snipData.command = { -- cgit v1.2.3