feat: more prompt position strategies (#1280)

* feat: allow `prompt_position` for `vertical` layout strategy

* feat: allow `prompt_position` for `bottom_pane` layout strategy

* stylua

* [docgen] Update doc/telescope.txt
skip-checks: true

* refactor: switch to `string.format`

* stylua

* feat: allow `prompt_position` for `center` layout strategy

* feat: handle user defined `prompt_position` within themes

* [docgen] Update doc/telescope.txt
skip-checks: true

* fix: tweak `center` layout

- ensure `prompt` title is visible when `prompt_position="bottom"`

* fix: refactor `center` tweak

- move title to bottom of picker when `prompt_position="bottom"`

* fix: tweak `bottom_pane` layout

* stylua

Co-authored-by: Github Actions <actions@github>
This commit is contained in:
Luke Kershaw
2021-10-04 20:16:58 +01:00
committed by GitHub
parent e39ed31f17
commit be600b5421
4 changed files with 79 additions and 19 deletions

View File

@@ -114,11 +114,13 @@ telescope.setup({opts}) *telescope.setup()*
Default: {
bottom_pane = {
height = 25
height = 25,
prompt_position = "top"
},
center = {
height = 0.9,
preview_cutoff = 40,
prompt_position = "top",
width = 0.8
},
cursor = {
@@ -135,6 +137,7 @@ telescope.setup({opts}) *telescope.setup()*
vertical = {
height = 0.9,
preview_cutoff = 40,
prompt_position = "bottom",
width = 0.8
}
}
@@ -1679,7 +1682,8 @@ layout_strategies.vertical() *layout_strategies.vertical()*
- Change the height of Telescope's preview window
- See |resolver.resolve_height()|
- prompt_position:
- (unimplemented, but we plan on supporting)
- Where to place prompt window.
- Available Values: 'bottom', 'top'
layout_strategies.flex() *layout_strategies.flex()*