Skip to content

Commit 172bd53

Browse files
author
Github Actions
committed
[docgen] Update doc/telescope.txt
skip-checks: true
1 parent 3a1ce1f commit 172bd53

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

doc/telescope.txt

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,23 @@ telescope.setup({opts}) *telescope.setup()*
4545
of 50% of the screen width.
4646

4747
Default: {
48+
center = {
49+
height = 0.5,
50+
preview_cutoff = {
51+
lines = 40
52+
}
53+
},
4854
height = 0.9,
4955
horizontal = {
50-
preview_cutoff = 120,
56+
preview_cutoff = {
57+
columns = 120
58+
},
59+
prompt_position = "bottom"
60+
},
61+
vertical = {
62+
preview_cutoff = {
63+
lines = 40
64+
},
5165
prompt_position = "bottom"
5266
},
5367
width = 0.8
@@ -999,6 +1013,25 @@ resolver.resolve_width() *resolver.resolve_width()*
9991013

10001014

10011015

1016+
resolver.resolve_cutoff() *resolver.resolve_cutoff()*
1017+
Converts input to a function that returns a boolean. The input must take
1018+
one of four forms:
1019+
1. boolean: The cutoff is then a function that always returns the given
1020+
boolean.
1021+
2. table of the form: {columns = `foo`} <br> where `foo` is a number >= 1.
1022+
<br> The cutoff is then a function that is true when `max_columns` is
1023+
greater than or equal to `foo` and is false otherwise.
1024+
3. table of the form: {lines = `foo`} <br> where `foo` is a number >= 1.
1025+
<br> The cutoff is then a function that is true when `max_lines` is
1026+
greater than or equal to `foo` and is false otherwise.
1027+
4. function
1028+
Must have signature: function(self, max_columns, max_lines): boolean
1029+
1030+
The returned function will have signature: function(self, max_columns,
1031+
max_lines): boolean
1032+
1033+
1034+
10021035
resolver.win_option() *resolver.win_option()*
10031036
Win option always returns a table with preview, results, and prompt. It
10041037
handles many different ways. Some examples are as follows:
@@ -1338,7 +1371,9 @@ layout_strategies.horizontal() *layout_strategies.horizontal()*
13381371
- See |resolver.resolve_width()|
13391372

13401373
`picker.layout_config` unique options:
1341-
- preview_cutoff: When columns are less than this value, the preview will be disabled
1374+
- preview_cutoff:
1375+
- Decides whether to display preview based on size of window.
1376+
- See |resolver.resolve_cutoff|
13421377
- preview_width:
13431378
- Change the width of Telescope's preview window
13441379
- See |resolver.resolve_width()|
@@ -1381,7 +1416,9 @@ layout_strategies.center() *layout_strategies.center()*
13811416
- See |resolver.resolve_width()|
13821417

13831418
`picker.layout_config` unique options:
1384-
- preview_cutoff: When columns are less than this value, the preview will be disabled
1419+
- preview_cutoff:
1420+
- Decides whether to display preview based on size of window.
1421+
- See |resolver.resolve_cutoff|
13851422

13861423

13871424
layout_strategies.vertical() *layout_strategies.vertical()*
@@ -1416,6 +1453,9 @@ layout_strategies.vertical() *layout_strategies.vertical()*
14161453
- See |resolver.resolve_width()|
14171454

14181455
`picker.layout_config` unique options:
1456+
- preview_cutoff:
1457+
- Decides whether to display preview based on size of window.
1458+
- See |resolver.resolve_cutoff|
14191459
- preview_height:
14201460
- Change the height of Telescope's preview window
14211461
- See |resolver.resolve_height()|

0 commit comments

Comments
 (0)