summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlef Pereira <alefpereira@users.noreply.github.com>2022-03-02 18:05:09 -0400
committerGitHub <noreply@github.com>2022-03-02 22:05:09 +0000
commit76120285f88c1becb5728695f6df77c545437c53 (patch)
tree11be3e91311977c27530e6207d2d6126bc3650a3 /doc
parent567ec85b157f1606b500a0f755181f284810a28e (diff)
Change center layout strategy to allow vertical anchoring (#1719)
* Change center layout strategy to allow vertical anchoring Affects `telescope.pickers.layout_strategies.center` that is used by dropdown (`telescope.themes.get_dropdown()`) theme, allowing more customization for dropdown theme, i. e. setting it in the top with mirrored preview. For `anchor` containing `N` or `S` will ignore `mirror` config and preview will be placed as follows: - Anchoring for `N` put the preview below the prompt result block. - Anchoring for `S` put the preview above the prompt result block. - For horizontal anchoring preview will be placed according to `mirror`. * [docgen] Update doc/telescope.txt skip-checks: true Co-authored-by: Github Actions <actions@github>
Diffstat (limited to 'doc')
-rw-r--r--doc/telescope.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/doc/telescope.txt b/doc/telescope.txt
index f9d0208..255e85f 100644
--- a/doc/telescope.txt
+++ b/doc/telescope.txt
@@ -1631,11 +1631,15 @@ layout_strategies.horizontal() *layout_strategies.horizontal()*
layout_strategies.center() *layout_strategies.center()*
Centered layout with a combined block of the prompt and results aligned to
the middle of the screen. The preview window is then placed in the
- remaining space above. Particularly useful for creating dropdown menus (see
- |telescope.themes| and |themes.get_dropdown()|`).
-
- Note that the `anchor` option can only pin this layout to the left or right
- edges.
+ remaining space above or below, according to `anchor` or `mirror`.
+ Particularly useful for creating dropdown menus (see |telescope.themes| and
+ |themes.get_dropdown()|).
+
+ Note that vertical anchoring, i.e. `anchor` containing `"N"` or `"S"`, will
+ override `mirror` config. For `"N"` anchoring preview will be placed below
+ prompt/result block. For `"S"` anchoring preview will be placed above
+ prompt/result block. For horizontal only anchoring preview will be placed
+ according to `mirror` config, default is above the prompt/result block.
┌──────────────────────────────────────────────────┐
│ ┌────────────────────────────────────────┐ │