mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
extra options for the telescope integration
This commit is contained in:
parent
4428a478e7
commit
f4f3039bca
1 changed files with 18 additions and 13 deletions
|
@ -36,14 +36,15 @@ local function aerial_picker(opts)
|
|||
backend.fetch_symbols_sync(0, opts)
|
||||
end
|
||||
|
||||
local displayer = entry_display.create({
|
||||
separator = " ",
|
||||
items = {
|
||||
{ width = 4 },
|
||||
{ width = 30 },
|
||||
{ remaining = true },
|
||||
},
|
||||
})
|
||||
local displayer = opts.displayer
|
||||
or entry_display.create({
|
||||
separator = " ",
|
||||
items = {
|
||||
{ width = 4 },
|
||||
{ width = 30 },
|
||||
{ remaining = true },
|
||||
},
|
||||
})
|
||||
|
||||
local function make_display(entry)
|
||||
local item = entry.value
|
||||
|
@ -60,11 +61,15 @@ local function aerial_picker(opts)
|
|||
|
||||
local function make_entry(item)
|
||||
local name = item.name
|
||||
if show_nesting then
|
||||
local cur = item.parent
|
||||
while cur do
|
||||
name = string.format("%s.%s", cur.name, name)
|
||||
cur = cur.parent
|
||||
if opts.get_entry_text ~= nil then
|
||||
name = opts.get_entry_text(item)
|
||||
else
|
||||
if show_nesting then
|
||||
local cur = item.parent
|
||||
while cur do
|
||||
name = string.format("%s.%s", cur.name, name)
|
||||
cur = cur.parent
|
||||
end
|
||||
end
|
||||
end
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue