docs: layout strategy usage (#1493)

This commit is contained in:
Luke Kershaw
2021-12-03 14:21:26 +00:00
committed by GitHub
parent 60a4ce080f
commit 0c819d6605
2 changed files with 30 additions and 0 deletions

View File

@@ -1563,6 +1563,22 @@ themes.get_ivy() *themes.get_ivy()*
================================================================================
*telescope.layout*
The layout of telescope pickers can be adjusted using the
|telescope.defaults.layout_strategy| and |telescope.defaults.layout_config|
options. For example, the following configuration changes the default layout
strategy and the default size of the picker:
>
require('telescope').setup{
defaults = {
layout_strategy = 'vertical',
layout_config = { height = 0.95 },
},
}
<
────────────────────────────────────────────────────────────────────────────────
Layout strategies are different functions to position telescope.
All layout strategies are functions with the following signature:

View File

@@ -1,6 +1,20 @@
---@tag telescope.layout
---@brief [[
--- The layout of telescope pickers can be adjusted using the
--- |telescope.defaults.layout_strategy| and |telescope.defaults.layout_config| options.
--- For example, the following configuration changes the default layout strategy and the
--- default size of the picker:
--- <code>
--- require('telescope').setup{
--- defaults = {
--- layout_strategy = 'vertical',
--- layout_config = { height = 0.95 },
--- },
--- }
--- </code>
---
--- ────────────────────────────────────────────────────────────────────────────────
---
--- Layout strategies are different functions to position telescope.
---