From 36dce6261ae3660bb57ba942361067b2028aec31 Mon Sep 17 00:00:00 2001 From: James Trew <66286082+jamestrew@users.noreply.github.com> Date: Mon, 22 Jan 2024 22:13:22 -0500 Subject: [PATCH] doc(layout_strategies): document shared options for `bottom_pane` (#2887) * doc(layout_strategies): document shared options for `bottom_pane` * [docgen] Update doc/telescope.txt skip-checks: true --------- Co-authored-by: Github Actions --- doc/telescope.txt | 15 +++++++++++++++ lua/telescope/pickers/layout_strategies.lua | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/telescope.txt b/doc/telescope.txt index ea9c424..87414ca 100644 --- a/doc/telescope.txt +++ b/doc/telescope.txt @@ -2357,6 +2357,21 @@ layout_strategies.bottom_pane() *telescope.layout.bottom_pane()* For an easy ivy configuration, see |themes.get_ivy()| + `picker.layout_config` shared options: + - height: + - How tall to make Telescope's entire layout + - See |resolver.resolve_height()| + - mirror: Flip the location of the results/prompt and preview windows + - prompt_position: + - Where to place prompt window. + - Available Values: 'bottom', 'top' + - scroll_speed: The number of lines to scroll through the previewer + + `picker.layout_config` unique options: + - preview_cutoff: When columns are less than this value, the preview will be disabled + - preview_width: + - Change the width of Telescope's preview window + - See |resolver.resolve_width()| diff --git a/lua/telescope/pickers/layout_strategies.lua b/lua/telescope/pickers/layout_strategies.lua index 931da09..32c68cb 100644 --- a/lua/telescope/pickers/layout_strategies.lua +++ b/lua/telescope/pickers/layout_strategies.lua @@ -847,9 +847,15 @@ end) --- Bottom pane can be used to create layouts similar to "ivy". --- --- For an easy ivy configuration, see |themes.get_ivy()| +---@eval { ["description"] = require("telescope.pickers.layout_strategies")._format("bottom_pane") } layout_strategies.bottom_pane = make_documented_layout( "bottom_pane", - vim.tbl_extend("error", shared_options, { + vim.tbl_extend("error", { + height = shared_options.height, + mirror = shared_options.mirror, + scroll_speed = shared_options.scroll_speed, + prompt_position = shared_options.prompt_position, + }, { preview_width = { "Change the width of Telescope's preview window", "See |resolver.resolve_width()|" }, preview_cutoff = "When columns are less than this value, the preview will be disabled", }),