@@ -45,9 +45,23 @@ telescope.setup({opts}) *telescope.setup()*
45
45
of 50% of the screen width.
46
46
47
47
Default: {
48
+ center = {
49
+ height = 0.5,
50
+ preview_cutoff = {
51
+ lines = 40
52
+ }
53
+ },
48
54
height = 0.9,
49
55
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
+ },
51
65
prompt_position = "bottom"
52
66
},
53
67
width = 0.8
@@ -999,6 +1013,25 @@ resolver.resolve_width() *resolver.resolve_width()*
999
1013
1000
1014
1001
1015
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
+
1002
1035
resolver.win_option() *resolver.win_option()*
1003
1036
Win option always returns a table with preview, results, and prompt. It
1004
1037
handles many different ways. Some examples are as follows:
@@ -1338,7 +1371,9 @@ layout_strategies.horizontal() *layout_strategies.horizontal()*
1338
1371
- See | resolver.resolve_width() |
1339
1372
1340
1373
`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 |
1342
1377
- preview_width:
1343
1378
- Change the width of Telescope's preview window
1344
1379
- See | resolver.resolve_width() |
@@ -1381,7 +1416,9 @@ layout_strategies.center() *layout_strategies.center()*
1381
1416
- See | resolver.resolve_width() |
1382
1417
1383
1418
`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 |
1385
1422
1386
1423
1387
1424
layout_strategies.vertical() *layout_strategies.vertical()*
@@ -1416,6 +1453,9 @@ layout_strategies.vertical() *layout_strategies.vertical()*
1416
1453
- See | resolver.resolve_width() |
1417
1454
1418
1455
`picker.layout_config` unique options:
1456
+ - preview_cutoff:
1457
+ - Decides whether to display preview based on size of window.
1458
+ - See | resolver.resolve_cutoff |
1419
1459
- preview_height:
1420
1460
- Change the height of Telescope's preview window
1421
1461
- See | resolver.resolve_height() |
0 commit comments