mirror of https://github.com/hrsh7th/cmp-path
Fix filename completion
This commit is contained in:
parent
b5e157c8ae
commit
175a385424
|
@ -125,6 +125,7 @@ source._candidates = function(_, context, dirname, offset, callback)
|
|||
else
|
||||
table.insert(items, {
|
||||
label = name,
|
||||
filterText = '/' .. name,
|
||||
insertText = '/' .. name,
|
||||
kind = cmp.lsp.CompletionItemKind.File,
|
||||
})
|
||||
|
@ -133,6 +134,7 @@ source._candidates = function(_, context, dirname, offset, callback)
|
|||
elseif type == 'file' then
|
||||
table.insert(items, {
|
||||
label = name,
|
||||
filterText = '/' .. name,
|
||||
insertText = '/' .. name,
|
||||
kind = cmp.lsp.CompletionItemKind.File,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue