feat: Add only_sort_tags option for builtin.tags (#825)

This commit is contained in:
Eugene Oliveros
2021-05-08 19:38:18 +08:00
committed by GitHub
parent 88f7b27222
commit bc6385be31

View File

@@ -834,6 +834,8 @@ function make_entry.gen_from_vimoptions()
end
end
--- Special options:
--- - only_sort_tags: Only sort via tag name. Ignore filename and other items
function make_entry.gen_from_ctags(opts)
opts = opts or {}
@@ -893,10 +895,17 @@ function make_entry.gen_from_ctags(opts)
return nil
end
local ordinal
if opts.only_sort_tags then
ordinal = tag
else
ordinal = file .. ': ' .. tag
end
return {
valid = true,
ordinal = file .. ': ' .. tag,
ordinal = ordinal,
display = make_display,
scode = scode,
tag = tag,