summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorJonathan Birk <1965620+cafce25@users.noreply.github.com>2022-03-20 19:08:54 +0000
committerGitHub <noreply@github.com>2022-03-20 20:08:54 +0100
commit6a43634f5f492113fd0bdec225d936a17b9ecbf2 (patch)
tree67e2131ecb941ab2dfcc6dc98ff1e9e8208fee8b /lua
parent8c7ac1df9dff09630461e99f169047b37b903619 (diff)
doc: help for select_{default,tab,vertical,horizontal} (#1801)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/actions/init.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index c6b3514..e0b9f79 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -179,6 +179,11 @@ function actions.center(_)
vim.cmd ":normal! zz"
end
+--- Perform default action on selection, usually something like<br>
+--- `:edit <selection>`
+---
+--- i.e. open the selection in the current buffer
+---@param prompt_bufnr number: The prompt bufnr
actions.select_default = {
pre = function(prompt_bufnr)
action_state.get_current_history():append(
@@ -191,6 +196,11 @@ actions.select_default = {
end,
}
+--- Perform 'horizontal' action on selection, usually something like<br>
+---`:new <selection>`
+---
+--- i.e. open the selection in a new horizontal split
+---@param prompt_bufnr number: The prompt bufnr
actions.select_horizontal = {
pre = function(prompt_bufnr)
action_state.get_current_history():append(
@@ -203,6 +213,11 @@ actions.select_horizontal = {
end,
}
+--- Perform 'vertical' action on selection, usually something like<br>
+---`:vnew <selection>`
+---
+--- i.e. open the selection in a new vertical split
+---@param prompt_bufnr number: The prompt bufnr
actions.select_vertical = {
pre = function(prompt_bufnr)
action_state.get_current_history():append(
@@ -215,6 +230,11 @@ actions.select_vertical = {
end,
}
+--- Perform 'tab' action on selection, usually something like<br>
+---`:tabedit <selection>`
+---
+--- i.e. open the selection in a new tab
+---@param prompt_bufnr number: The prompt bufnr
actions.select_tab = {
pre = function(prompt_bufnr)
action_state.get_current_history():append(