Skip to content

Commit 18d713f

Browse files
author
Github Actions
committed
[docgen] Update doc/telescope.txt
skip-checks: true
1 parent d9be9bb commit 18d713f

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

doc/telescope.txt

+27-12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ telescope.setup({opts}) *telescope.setup()*
1919

2020
Valid keys for {opts.defaults}
2121

22+
*telescope.defaults.border*
23+
border: ~
24+
Boolean defining if borders are added to Telescope windows.
25+
26+
Default: true
27+
2228
*telescope.defaults.default_mappings*
2329
default_mappings: ~
2430
Not recommended to use except for advanced users.
@@ -93,25 +99,40 @@ telescope.setup({opts}) *telescope.setup()*
9399

94100
mappings = {
95101
i = {
96-
["<esc>"] = actions.close,
102+
["<esc>"] = require('telescope.actions').close,
97103
},
98104
}
99105

100106

101107
To disable a keymap, put [map] = false
102108
So, to not map "<C-n>", just put
103109

104-
...,
105-
["<C-n>"] = false,
106-
...,
110+
...,
111+
["<C-n>"] = false,
112+
...,
107113

108114
Into your config.
109115

110116

111117
otherwise, just set the mapping to the function that you want it to be.
112118

113119
...,
114-
["<C-i>"] = actions.select_default
120+
["<C-i>"] = require('telescope.actions').select_default,
121+
...,
122+
123+
If the function you want is part of `telescope.actions`, then you can simply give a string.
124+
For example, the previous option is equivalent to:
125+
126+
...,
127+
["<C-i>"] = "select_default",
128+
...,
129+
130+
You can also add other mappings using tables with `type = "command"`.
131+
For example:
132+
133+
...,
134+
["jj"] = { "<esc>", type = "command" },
135+
["kk"] = { "<cmd>echo \"Hello, World!\"<cr>", type = "command" },)
115136
...,
116137

117138

@@ -559,7 +580,7 @@ require("telescope").setup {
559580
mappings = {
560581
i = {
561582
["<c-d>"] = require("telescope.actions").delete_buffer,
562-
-- or right hand side can also be a the name of the action as string
583+
-- or right hand side can also be the name of the action as string
563584
["<c-d>"] = "delete_buffer",
564585
},
565586
n = {
@@ -1244,12 +1265,6 @@ resolver.resolve_width() *resolver.resolve_width()*
12441265

12451266

12461267

1247-
resolver.win_option() *resolver.win_option()*
1248-
Win option always returns a table with preview, results, and prompt. It
1249-
handles many different ways. Some examples are as follows:
1250-
1251-
1252-
12531268

12541269
================================================================================
12551270
*telescope.previewers*

0 commit comments

Comments
 (0)