summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-06 20:48:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-06 20:48:11 +0800
commit2a2bec22fc6c7146f34b18b678c4544befee306c (patch)
tree820e0ebb0678dcbbe871405b4f676a96af6a5f1c /script
parentf90d92b0434d7bcafda41503b1b8be64d310a782 (diff)
downloadlua-language-server-2a2bec22fc6c7146f34b18b678c4544befee306c.zip
minor improve
Diffstat (limited to 'script')
-rw-r--r--script/core/completion/completion.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index 44efc72b..c457a14a 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -945,6 +945,7 @@ local function collectRequireNames(mode, myUri, literal, source, smark, position
goto CONTINUE
end
local path = workspace.getRelativePath(uri)
+ path = path:gsub('\\', '/')
if matchKey(literal, path) then
if not collect[path] then
collect[path] = {
@@ -974,7 +975,7 @@ local function collectRequireNames(mode, myUri, literal, source, smark, position
end
results[#results+1] = {
label = label,
- kind = define.CompletionItemKind.Reference,
+ kind = define.CompletionItemKind.File,
description = table.concat(des, '\n'),
textEdit = infos.textEdit,
}