From 37c9ab6688eb2cf46a22c70c8d46ca9d4e147e85 Mon Sep 17 00:00:00 2001 From: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Date: Sun, 19 Sep 2021 09:30:25 +0100 Subject: feat: `layout_strategies` refactor (#1039) * wip: 2021-07-22 15:00 BST * wip: `horizontal` refactored * wip: `center` refactored * wip: `cursor` and `vertical` refactored * wip: `current_buffer` refactor - also changed `layout_config_defaults` as they gave errors when using `current_buffer` * wip: `bottom_pane` refactor * [docgen] Update doc/telescope.txt skip-checks: true * fix: put accidentally remove config option back * [docgen] Update doc/telescope.txt skip-checks: true * wip: standardise `height` calculation for `center` and `bottom_pane` * wip: improve comments * [docgen] Update doc/telescope.txt skip-checks: true * stylua - also fix a merge mistake * [docgen] Update doc/telescope.txt skip-checks: true * fix: attempt to fix bad merge * refactor: remove unused entry in `borderchars` table - also fix some typos * wip: tweak padding for `bottom_pane` * wip: add `tabline` checks to `bottom_pane` - also tweaked position so that `statusline` is not covered when borders are enabled * stylua * refactor: factor out size capping function * [docgen] Update doc/telescope.txt skip-checks: true * fix: adjust tests that relied on height being number of results * fix: forgot variable in calc_size_and_spacing * fix: maybe this fixes these tests? * test: try other plenary branch for ci * test: switch back to main plenary branch for ci * fix: actually define `max_results` in the test * fix: final tweaks for edge cases Co-authored-by: Github Actions --- lua/telescope/config.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lua/telescope/config.lua') diff --git a/lua/telescope/config.lua b/lua/telescope/config.lua index 5fa0cf1..554d801 100644 --- a/lua/telescope/config.lua +++ b/lua/telescope/config.lua @@ -76,25 +76,35 @@ function config.set_pickers(pickers) end local layout_config_defaults = { - width = 0.8, - height = 0.9, horizontal = { + width = 0.8, + height = 0.9, prompt_position = "bottom", preview_cutoff = 120, }, vertical = { + width = 0.8, + height = 0.9, preview_cutoff = 40, }, center = { + width = 0.8, + height = 0.9, preview_cutoff = 40, }, cursor = { + width = 0.8, + height = 0.9, preview_cutoff = 40, }, + + bottom_pane = { + height = 25, + }, } local layout_config_description = string.format( -- cgit v1.2.3