feat: global configuration of results_title and prompt_title (#1817)
This commit is contained in:
@@ -307,6 +307,21 @@ telescope.setup({opts}) *telescope.setup()*
|
|||||||
|
|
||||||
Default: false
|
Default: false
|
||||||
|
|
||||||
|
*telescope.defaults.results_title*
|
||||||
|
results_title: ~
|
||||||
|
Defines the default title of the results window. A false value
|
||||||
|
can be used to hide the title altogether.
|
||||||
|
|
||||||
|
Default: "Results"
|
||||||
|
|
||||||
|
*telescope.defaults.prompt_title*
|
||||||
|
prompt_title: ~
|
||||||
|
Defines the default title of the prompt window. A false value
|
||||||
|
can be used to hide the title altogether. Most of the times builtins
|
||||||
|
define a prompt_title which will be prefered over this default.
|
||||||
|
|
||||||
|
Default: "Prompt"
|
||||||
|
|
||||||
*telescope.defaults.history*
|
*telescope.defaults.history*
|
||||||
history: ~
|
history: ~
|
||||||
This field handles the configuration for prompt history.
|
This field handles the configuration for prompt history.
|
||||||
|
|||||||
@@ -419,6 +419,27 @@ append(
|
|||||||
Default: false]]
|
Default: false]]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
append(
|
||||||
|
"results_title",
|
||||||
|
"Results",
|
||||||
|
[[
|
||||||
|
Defines the default title of the results window. A false value
|
||||||
|
can be used to hide the title altogether.
|
||||||
|
|
||||||
|
Default: "Results"]]
|
||||||
|
)
|
||||||
|
|
||||||
|
append(
|
||||||
|
"prompt_title",
|
||||||
|
"Prompt",
|
||||||
|
[[
|
||||||
|
Defines the default title of the prompt window. A false value
|
||||||
|
can be used to hide the title altogether. Most of the times builtins
|
||||||
|
define a prompt_title which will be prefered over this default.
|
||||||
|
|
||||||
|
Default: "Prompt"]]
|
||||||
|
)
|
||||||
|
|
||||||
append(
|
append(
|
||||||
"history",
|
"history",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ function Picker:new(opts)
|
|||||||
local layout_strategy = get_default(opts.layout_strategy, config.values.layout_strategy)
|
local layout_strategy = get_default(opts.layout_strategy, config.values.layout_strategy)
|
||||||
|
|
||||||
local obj = setmetatable({
|
local obj = setmetatable({
|
||||||
prompt_title = get_default(opts.prompt_title, "Prompt"),
|
prompt_title = get_default(opts.prompt_title, config.values.prompt_title),
|
||||||
results_title = get_default(opts.results_title, "Results"),
|
results_title = get_default(opts.results_title, config.values.results_title),
|
||||||
-- either whats passed in by the user or whats defined by the previewer
|
-- either whats passed in by the user or whats defined by the previewer
|
||||||
preview_title = opts.preview_title,
|
preview_title = opts.preview_title,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user