diff options
-rw-r--r-- | server/src/core/completion.lua | 7 | ||||
-rw-r--r-- | server/test/crossfile/completion.lua | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index 29a3637e..0373e394 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -258,13 +258,10 @@ local function searchInArg(vm, inCall, inString, callback) for _, v in ipairs(results) do if v ~= inString[1] then local sep = inString[1]:find('[^%w_][%w_]-$') - local insertText if sep then - --v = v:sub(sep+1) + v = v:sub(sep+1) end - callback(v, CompletionItemKind.File, { - insertText = insertText, - }) + callback(v, CompletionItemKind.File) end end end diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua index da4c1d7d..73d60d5b 100644 --- a/server/test/crossfile/completion.lua +++ b/server/test/crossfile/completion.lua @@ -186,7 +186,7 @@ TEST { }, completion = { { - label = 'abc.init', + label = 'init', kind = CompletionItemKind.File, }, } @@ -208,7 +208,7 @@ TEST { }, completion = { { - label = 'abc.init', + label = 'init', kind = CompletionItemKind.File, }, } @@ -230,7 +230,7 @@ TEST { }, completion = { { - label = 'core.core', + label = 'core', kind = CompletionItemKind.File, }, } |