summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/completion.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index cdb68580..29a3637e 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -257,7 +257,14 @@ local function searchInArg(vm, inCall, inString, callback)
end
for _, v in ipairs(results) do
if v ~= inString[1] then
- callback(v, CompletionItemKind.File)
+ local sep = inString[1]:find('[^%w_][%w_]-$')
+ local insertText
+ if sep then
+ --v = v:sub(sep+1)
+ end
+ callback(v, CompletionItemKind.File, {
+ insertText = insertText,
+ })
end
end
end