Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 8365fff

Browse files
committed
Use conventional file type identifiers in path completion
1 parent dc923c3 commit 8365fff

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

lua/source/path.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ local function onread(err, data)
2323
end
2424

2525
local fileTypesMap = {
26-
['f'] = "[file]",
27-
['d'] = "[dir]",
28-
['c'] = "[char]",
29-
['l'] = "[link]",
30-
['b'] = "[block]",
31-
['p'] = "[pipe]",
32-
['s'] = "[socket]"
26+
['f'] = "(file)",
27+
['d'] = "(dir)",
28+
['c'] = "(char)",
29+
['l'] = "(link)",
30+
['b'] = "(block)",
31+
['p'] = "(pipe)",
32+
['s'] = "(socket)"
3333
}
3434

3535
M.getCompletionItems = function(prefix, score_func)
@@ -39,7 +39,7 @@ M.getCompletionItems = function(prefix, score_func)
3939
if score < #prefix/3 or #prefix == 0 then
4040
table.insert(complete_items, {
4141
word = val.name,
42-
kind = fileTypesMap[val.t],
42+
kind = 'Path ' .. fileTypesMap[val.t],
4343
score = score,
4444
icase = 1,
4545
dup = 1,

0 commit comments

Comments
 (0)