mirror of
https://codeberg.org/FelipeLema/cmp-async-path
synced 2025-05-14 05:38:33 +00:00
Support chained completion
This commit is contained in:
parent
ad85ac623d
commit
b5e157c8ae
@ -107,7 +107,9 @@ source._candidates = function(_, context, dirname, offset, callback)
|
|||||||
if accept then
|
if accept then
|
||||||
if type == 'directory' then
|
if type == 'directory' then
|
||||||
table.insert(items, {
|
table.insert(items, {
|
||||||
|
word = '/' .. name,
|
||||||
label = '/' .. name,
|
label = '/' .. name,
|
||||||
|
insertText = '/' .. name .. '/',
|
||||||
kind = cmp.lsp.CompletionItemKind.Folder,
|
kind = cmp.lsp.CompletionItemKind.Folder,
|
||||||
})
|
})
|
||||||
elseif type == 'link' then
|
elseif type == 'link' then
|
||||||
@ -115,7 +117,9 @@ source._candidates = function(_, context, dirname, offset, callback)
|
|||||||
if stat then
|
if stat then
|
||||||
if stat.type == 'directory' then
|
if stat.type == 'directory' then
|
||||||
table.insert(items, {
|
table.insert(items, {
|
||||||
|
word = '/' .. name,
|
||||||
label = '/' .. name,
|
label = '/' .. name,
|
||||||
|
insertText = '/' .. name .. '/',
|
||||||
kind = cmp.lsp.CompletionItemKind.Folder,
|
kind = cmp.lsp.CompletionItemKind.Folder,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user