diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-07 16:25:30 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-07 16:25:30 +0800 |
commit | 24b83882cfca469a797bf5536f2d5c68762189bb (patch) | |
tree | 98f81c31f04733a86d48da2d31a45c96f69284aa /script/core/completion.lua | |
parent | d0f2fff90e56a6e2b1448217174e29fb0d17d05a (diff) | |
download | lua-language-server-24b83882cfca469a797bf5536f2d5c68762189bb.zip |
fix insertText
Diffstat (limited to 'script/core/completion.lua')
-rw-r--r-- | script/core/completion.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua index 03d17a22..60c3e16d 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -288,6 +288,7 @@ local function checkLocal(ast, word, offset, results) local funcLabel = name .. getParams(def, false) buildFunction(results, source, false, { label = funcLabel, + insertText = name, kind = define.CompletionItemKind.Function, id = stack(function () return { @@ -436,6 +437,7 @@ local function checkFieldThen(name, src, word, start, offset, parent, oop, resul buildFunction(results, src, oop, { label = name, kind = kind, + insertText = name:match '^[^(]+', deprecated = vm.isDeprecated(src) or nil, id = stack(function () return { |