summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-04 16:18:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-04 16:18:03 +0800
commitc74a40802791169b2bc14716e2e8a81fd476f11f (patch)
tree42bf409dae2d7d54a1bed2e5c8a34e802a75a7ed /script/core
parented95ca797f1d2e1e4f79a361a441d6226b867f37 (diff)
downloadlua-language-server-c74a40802791169b2bc14716e2e8a81fd476f11f.zip
#992
using `Snippet` only when `callSnippet` is `Both`
Diffstat (limited to 'script/core')
-rw-r--r--script/core/completion/completion.lua4
1 files changed, 3 insertions, 1 deletions
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 = {