feat: Themes (#79)
Big shoutout to @rockerBOO for the idea and basically all the impl! * feat: Add dropdown layout strategy * Adding more docs. Working better with options * Refactor borders * Fix for spaces * Add preview to layout. Add Themes. * feat: themes Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
This commit is contained in:
@@ -83,6 +83,10 @@ function Picker:new(opts)
|
||||
|
||||
return setmetatable({
|
||||
prompt = opts.prompt,
|
||||
|
||||
results_title = get_default(opts.results_title, "Results"),
|
||||
preview_title = get_default(opts.preview_title, "Preview"),
|
||||
|
||||
default_text = opts.default_text,
|
||||
|
||||
finder = opts.finder,
|
||||
@@ -139,7 +143,7 @@ function Picker:_get_initial_window_options(prompt_title)
|
||||
local popup_borderchars = resolve.win_option(self.window.borderchars)
|
||||
|
||||
local preview = {
|
||||
title = 'Preview',
|
||||
title = self.preview_title,
|
||||
border = popup_border.preview,
|
||||
borderchars = popup_borderchars.preview,
|
||||
enter = false,
|
||||
@@ -147,7 +151,7 @@ function Picker:_get_initial_window_options(prompt_title)
|
||||
}
|
||||
|
||||
local results = {
|
||||
title = 'Results',
|
||||
title = self.results_title,
|
||||
border = popup_border.results,
|
||||
borderchars = popup_borderchars.results,
|
||||
enter = false,
|
||||
|
||||
Reference in New Issue
Block a user