docs: add other actions modules (#792)

* docs: add other actions modules

* [docgen] Update doc/telescope.txt
skip-checks: true

* fixup

* [docgen] Update doc/telescope.txt
skip-checks: true

Co-authored-by: Github Actions <actions@github>
This commit is contained in:
TJ DeVries
2021-04-22 14:08:22 -07:00
committed by GitHub
parent 0d6cd47990
commit c6980a9acf
4 changed files with 118 additions and 24 deletions

View File

@@ -92,22 +92,54 @@ telescope.extensions() *telescope.extensions()*
================================================================================
*telescope.builtin*
*telescope.actions.set*
A collection of builtin pickers for telescope.
Telescope action sets are used to provide an interface for managing actions
that all primarily do the same thing, but with slight tweaks.
Meant for both example and for easy startup.
For example, when editing files you may want it in the current split, a
vertical split, etc. Instead of making users have to overwrite EACH of those
every time they want to change this behavior, they can instead replace the
`set` itself and then it will work great and they're done.
Any of these functions can just be called directly by doing:
action_set.shift_selection({prompt_bufnr}, {change})*action_set.shift_selection()*
Move the current selection of a picker {change} rows. Handles not
overflowing / underflowing the list.
:lua require('telescope.builtin').$NAME()
This will use the default configuration options. Other configuration options
are still in flux at the moment
Parameters: ~
{prompt_bufnr} (number) The prompt bufnr
{change} (number) The amount to shift the selection by
builtin.live_grep() *builtin.live_grep()*
Live grep means grep as you type.
action_set.select({prompt_bufnr}, {type}) *action_set.select()*
Select the current entry. This is the action set to overwrite common
actions by the user.
By default maps to editing a file.
Parameters: ~
{prompt_bufnr} (number) The prompt bufnr
{type} (string) The type of selection to make
action_set.edit({prompt_bufnr}, {command}) *action_set.edit()*
Edit a file based on the current selection.
Parameters: ~
{prompt_bufnr} (number) The prompt bufnr
{command} (string) The command to use to open the file.
action_set.scroll_previewer({prompt_bufnr}, {direction})*action_set.scroll_previewer()*
Scrolls the previewer up or down
Parameters: ~
{prompt_bufnr} (number) The prompt bufnr
{direction} (number) The direction of the scrolling
@@ -234,6 +266,52 @@ actions.open_qflist() *actions.open_qflist()*
================================================================================
*telescope.builtin*
A collection of builtin pickers for telescope.
Meant for both example and for easy startup.
Any of these functions can just be called directly by doing:
:lua require('telescope.builtin').$NAME()
This will use the default configuration options. Other configuration options
are still in flux at the moment
builtin.live_grep() *builtin.live_grep()*
Live grep means grep as you type.
================================================================================
*telescope.actions.state*
Functions to be used to determine the current state of telescope.
Generally used from within other |telescope.actions|
action_state.get_selected_entry() *action_state.get_selected_entry()*
Get the current entry
action_state.get_current_line() *action_state.get_current_line()*
Gets the current line
action_state.get_current_picker({prompt_bufnr})*action_state.get_current_picker()*
Gets the current picker
Parameters: ~
{prompt_bufnr} (number) The prompt bufnr
================================================================================
*telescope.previewers*