Merge pull request #24 from tami5/feat/select/override_telescope_config
feat(select): override telescope config
This commit is contained in:
commit
a566ab5dd1
|
@ -23,9 +23,19 @@ M.select = function(config, items, opts, on_choice)
|
|||
}
|
||||
end
|
||||
|
||||
local picker_opts = type(config.theme) == "table"
|
||||
and vim.tbl_extend("force", config.theme, defaults)
|
||||
or themes[string.format("get_%s", config.theme)](defaults)
|
||||
local theme, ttype = nil, type(config.theme)
|
||||
if ttype == "string" then
|
||||
theme = themes[string.format("get_%s", config.theme)]
|
||||
elseif ttype == "function" then
|
||||
theme = config.theme
|
||||
else
|
||||
theme = function(s)
|
||||
return vim.tbl_extend("keep", s, config.theme or {})
|
||||
end
|
||||
end
|
||||
|
||||
local picker_opts = vim.tbl_extend("keep", config, theme({ previewer = false }))
|
||||
|
||||
|
||||
pickers.new(picker_opts, {
|
||||
prompt_title = opts.prompt,
|
||||
|
|
Loading…
Reference in New Issue