From 15d3cac7b17c0a44697affc42bd41c576e538e74 Mon Sep 17 00:00:00 2001 From: Dave Lage Date: Tue, 15 Sep 2020 14:54:29 -0400 Subject: 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 --- lua/telescope/pickers.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lua/telescope/pickers.lua') diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 4336558..a3fcc57 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -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, -- cgit v1.2.3