Skip to content

Commit 8fcde49

Browse files
committed
add detail for require name
1 parent 16376c8 commit 8fcde49

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

script/core/completion/completion.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,8 @@ local function collectRequireNames(mode, myUri, literal, source, smark, position
894894
start = smark and (source.start + #smark) or position,
895895
finish = smark and (source.finish - #smark) or position,
896896
newText = smark and info.expect or util.viewString(info.expect),
897-
}
897+
},
898+
path = path,
898899
}
899900
end
900901
if vm.isMetaFile(uri) then
@@ -921,7 +922,8 @@ local function collectRequireNames(mode, myUri, literal, source, smark, position
921922
start = smark and (source.start + #smark) or position,
922923
finish = smark and (source.finish - #smark) or position,
923924
newText = smark and open or util.viewString(open),
924-
}
925+
},
926+
path = path,
925927
}
926928
end
927929
collect[open][#collect[open]+1] = ([=[* [%s](%s)]=]):format(
@@ -969,8 +971,9 @@ local function collectRequireNames(mode, myUri, literal, source, smark, position
969971
end
970972
end
971973
results[#results+1] = {
972-
label = label,
973-
kind = define.CompletionItemKind.File,
974+
label = label,
975+
detail = infos.path,
976+
kind = define.CompletionItemKind.File,
974977
description = table.concat(des, '\n'),
975978
textEdit = infos.textEdit,
976979
}

0 commit comments

Comments
 (0)