Merge pull request #261 from frnsys/telescope_lines_config

Added an option to the telescope extension to hide lines
This commit is contained in:
Steven Arcangeli 2023-06-02 08:57:23 -07:00 committed by GitHub
commit dd5c41b66f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@ local pickers = require("telescope.pickers")
local telescope = require("telescope")
local ext_config = {
show_lines = true,
show_nesting = {
["_"] = false,
json = true,
@ -37,14 +38,23 @@ local function aerial_picker(opts)
backend.fetch_symbols_sync(0, opts)
end
local layout
if ext_config.show_lines then
layout = {
{ width = 4 },
{ width = 30 },
{ remaining = true },
}
else
layout = {
{ width = 4 },
{ remaining = true },
}
end
local displayer = opts.displayer
or entry_display.create({
separator = " ",
items = {
{ width = 4 },
{ width = 30 },
{ remaining = true },
},
items = layout,
})
local function make_display(entry)