docs: fix typos/wording (#2283)
This commit is contained in:
@@ -2126,23 +2126,23 @@ MAKE_ENTRY *telescope.make_entry*
|
|||||||
|
|
||||||
Each picker has a finder made up of two parts, the results which are the data
|
Each picker has a finder made up of two parts, the results which are the data
|
||||||
to be displayed, and the entry_maker. These entry_makers are functions returned
|
to be displayed, and the entry_maker. These entry_makers are functions returned
|
||||||
from make_entry functions. These will be referrd to as entry_makers in the
|
from make_entry functions. These will be referred to as entry_makers in the
|
||||||
following documentation.
|
following documentation.
|
||||||
|
|
||||||
Every entry maker returns a function which accepts the data to be used for an
|
Every entry maker returns a function that accepts the data to be used for an
|
||||||
entry. This function will return an entry table (or nil, meaning skip this
|
entry. This function will return an entry table (or nil, meaning skip this
|
||||||
entry) which contains of the - following important keys:
|
entry) which contains the following important keys:
|
||||||
- value any: value key can be anything but still required
|
- value any: value key can be anything but still required
|
||||||
- valid bool: is an optional key because it defaults to true but if the key is
|
- valid bool: is an optional key because it defaults to true but if the key is
|
||||||
set to false it will not be displayed by the picker. (optional)
|
set to false it will not be displayed by the picker (optional)
|
||||||
- ordinal string: is the text that is used for filtering (required)
|
- ordinal string: is the text that is used for filtering (required)
|
||||||
- display string|function: is either a string of the text that is being
|
- display string|function: is either a string of the text that is being
|
||||||
displayed or a function receiving the entry at a later stage, when the entry
|
displayed or a function receiving the entry at a later stage, when the entry
|
||||||
is actually being displayed. A function can be useful here if complex
|
is actually being displayed. A function can be useful here if a complex
|
||||||
calculation have to be done. `make_entry` can also return a second value a
|
calculation has to be done. `make_entry` can also return a second value a
|
||||||
highlight array which will then apply to the line. Highlight entry in this
|
highlight array which will then apply to the line. Highlight entry in this
|
||||||
array has the following signature `{ { start_col, end_col }, hl_group }`
|
array has the following signature `{ { start_col, end_col }, hl_group }`
|
||||||
(required).
|
(required)
|
||||||
- filename string: will be interpreted by the default `<cr>` action as open
|
- filename string: will be interpreted by the default `<cr>` action as open
|
||||||
this file (optional)
|
this file (optional)
|
||||||
- bufnr number: will be interpreted by the default `<cr>` action as open this
|
- bufnr number: will be interpreted by the default `<cr>` action as open this
|
||||||
@@ -2152,7 +2152,8 @@ entry) which contains of the - following important keys:
|
|||||||
- col number: col value which will be interpreted by the default `<cr>` action
|
- col number: col value which will be interpreted by the default `<cr>` action
|
||||||
as a jump to this column (optional)
|
as a jump to this column (optional)
|
||||||
|
|
||||||
More information on easier displaying, see |telescope.pickers.entry_display|
|
For more information on easier displaying, see
|
||||||
|
|telescope.pickers.entry_display|
|
||||||
|
|
||||||
TODO: Document something we call `entry_index`
|
TODO: Document something we call `entry_index`
|
||||||
|
|
||||||
@@ -2173,9 +2174,9 @@ the best performance.
|
|||||||
The create function will use the column widths passed to it in
|
The create function will use the column widths passed to it in
|
||||||
configaration.items. Each item in that table is the number of characters in the
|
configaration.items. Each item in that table is the number of characters in the
|
||||||
column. It's also possible for the final column to not have a fixed width, this
|
column. It's also possible for the final column to not have a fixed width, this
|
||||||
will be shown in the configuartion as 'remaining = true'.
|
will be shown in the configuration as 'remaining = true'.
|
||||||
|
|
||||||
An example of this configuration is shown for the buffers picker
|
An example of this configuration is shown for the buffers picker:
|
||||||
>
|
>
|
||||||
local displayer = entry_display.create {
|
local displayer = entry_display.create {
|
||||||
separator = " ",
|
separator = " ",
|
||||||
@@ -2189,10 +2190,10 @@ local displayer = entry_display.create {
|
|||||||
<
|
<
|
||||||
|
|
||||||
This shows 4 columns, the first is defined in the opts as the width we'll use
|
This shows 4 columns, the first is defined in the opts as the width we'll use
|
||||||
when display_string the number of the buffer. The second has a fixed width of 4
|
when display_string is the number of the buffer. The second has a fixed width
|
||||||
and the 3rd column's widht will be decided by the width of the icons we use.
|
of 4 and the third column's width will be decided by the width of the icons we
|
||||||
The fourth column will use the remaining space. Finally we have also defined
|
use. The fourth column will use the remaining space. Finally, we have also
|
||||||
the seperator between each column will be the space " ".
|
defined the separator between each column will be the space " ".
|
||||||
|
|
||||||
An example of how the display reference will be used is shown, again for the
|
An example of how the display reference will be used is shown, again for the
|
||||||
buffers picker:
|
buffers picker:
|
||||||
@@ -2208,11 +2209,12 @@ return displayer {
|
|||||||
There are two types of values each column can have. Either a simple String or a
|
There are two types of values each column can have. Either a simple String or a
|
||||||
table containing the String as well as the hl_group.
|
table containing the String as well as the hl_group.
|
||||||
|
|
||||||
The displayer can return values, string and an optional highlights. String is
|
The displayer can return values, string and an optional highlights. The string
|
||||||
all the text to be displayed for this entry as a single string. If parts of the
|
is all the text to be displayed for this entry as a single string. If parts of
|
||||||
string are to be highlighted they will be described in the highlights table.
|
the string are to be highlighted they will be described in the highlights
|
||||||
|
table.
|
||||||
|
|
||||||
For better understanding of how create() and displayer are used it's best to
|
For a better understanding of how create() and displayer are used it's best to
|
||||||
look at the code in make_entry.lua.
|
look at the code in make_entry.lua.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,23 +4,23 @@
|
|||||||
---
|
---
|
||||||
--- Each picker has a finder made up of two parts, the results which are the
|
--- Each picker has a finder made up of two parts, the results which are the
|
||||||
--- data to be displayed, and the entry_maker. These entry_makers are functions
|
--- data to be displayed, and the entry_maker. These entry_makers are functions
|
||||||
--- returned from make_entry functions. These will be referrd to as
|
--- returned from make_entry functions. These will be referred to as
|
||||||
--- entry_makers in the following documentation.
|
--- entry_makers in the following documentation.
|
||||||
---
|
---
|
||||||
--- Every entry maker returns a function which accepts the data to be used for
|
--- Every entry maker returns a function that accepts the data to be used for
|
||||||
--- an entry. This function will return an entry table (or nil, meaning skip
|
--- an entry. This function will return an entry table (or nil, meaning skip
|
||||||
--- this entry) which contains of the - following important keys:
|
--- this entry) which contains the following important keys:
|
||||||
--- - value any: value key can be anything but still required
|
--- - value any: value key can be anything but still required
|
||||||
--- - valid bool: is an optional key because it defaults to true but if the key
|
--- - valid bool: is an optional key because it defaults to true but if the key
|
||||||
--- is set to false it will not be displayed by the picker. (optional)
|
--- is set to false it will not be displayed by the picker (optional)
|
||||||
--- - ordinal string: is the text that is used for filtering (required)
|
--- - ordinal string: is the text that is used for filtering (required)
|
||||||
--- - display string|function: is either a string of the text that is being
|
--- - display string|function: is either a string of the text that is being
|
||||||
--- displayed or a function receiving the entry at a later stage, when the entry
|
--- displayed or a function receiving the entry at a later stage, when the entry
|
||||||
--- is actually being displayed. A function can be useful here if complex
|
--- is actually being displayed. A function can be useful here if a complex
|
||||||
--- calculation have to be done. `make_entry` can also return a second value
|
--- calculation has to be done. `make_entry` can also return a second value
|
||||||
--- a highlight array which will then apply to the line. Highlight entry in
|
--- a highlight array which will then apply to the line. Highlight entry in
|
||||||
--- this array has the following signature `{ { start_col, end_col }, hl_group }`
|
--- this array has the following signature `{ { start_col, end_col }, hl_group }`
|
||||||
--- (required).
|
--- (required)
|
||||||
--- - filename string: will be interpreted by the default `<cr>` action as
|
--- - filename string: will be interpreted by the default `<cr>` action as
|
||||||
--- open this file (optional)
|
--- open this file (optional)
|
||||||
--- - bufnr number: will be interpreted by the default `<cr>` action as open
|
--- - bufnr number: will be interpreted by the default `<cr>` action as open
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
--- - col number: col value which will be interpreted by the default `<cr>`
|
--- - col number: col value which will be interpreted by the default `<cr>`
|
||||||
--- action as a jump to this column (optional)
|
--- action as a jump to this column (optional)
|
||||||
---
|
---
|
||||||
--- More information on easier displaying, see |telescope.pickers.entry_display|
|
--- For more information on easier displaying, see |telescope.pickers.entry_display|
|
||||||
---
|
---
|
||||||
--- TODO: Document something we call `entry_index`
|
--- TODO: Document something we call `entry_index`
|
||||||
---@brief ]]
|
---@brief ]]
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
--- The create function will use the column widths passed to it in
|
--- The create function will use the column widths passed to it in
|
||||||
--- configaration.items. Each item in that table is the number of characters in
|
--- configaration.items. Each item in that table is the number of characters in
|
||||||
--- the column. It's also possible for the final column to not have a fixed
|
--- the column. It's also possible for the final column to not have a fixed
|
||||||
--- width, this will be shown in the configuartion as 'remaining = true'.
|
--- width, this will be shown in the configuration as 'remaining = true'.
|
||||||
---
|
---
|
||||||
--- An example of this configuration is shown for the buffers picker
|
--- An example of this configuration is shown for the buffers picker:
|
||||||
--- <code>
|
--- <code>
|
||||||
--- local displayer = entry_display.create {
|
--- local displayer = entry_display.create {
|
||||||
--- separator = " ",
|
--- separator = " ",
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
--- </code>
|
--- </code>
|
||||||
---
|
---
|
||||||
--- This shows 4 columns, the first is defined in the opts as the width we'll
|
--- This shows 4 columns, the first is defined in the opts as the width we'll
|
||||||
--- use when display_string the number of the buffer. The second has a fixed
|
--- use when display_string is the number of the buffer. The second has a fixed
|
||||||
--- width of 4 and the 3rd column's widht will be decided by the width of the
|
--- width of 4 and the third column's width will be decided by the width of the
|
||||||
--- icons we use. The fourth column will use the remaining space. Finally we
|
--- icons we use. The fourth column will use the remaining space. Finally, we
|
||||||
--- have also defined the seperator between each column will be the space " ".
|
--- have also defined the separator between each column will be the space " ".
|
||||||
---
|
---
|
||||||
--- An example of how the display reference will be used is shown, again for
|
--- An example of how the display reference will be used is shown, again for
|
||||||
--- the buffers picker:
|
--- the buffers picker:
|
||||||
@@ -49,12 +49,12 @@
|
|||||||
--- There are two types of values each column can have. Either a simple String
|
--- There are two types of values each column can have. Either a simple String
|
||||||
--- or a table containing the String as well as the hl_group.
|
--- or a table containing the String as well as the hl_group.
|
||||||
---
|
---
|
||||||
--- The displayer can return values, string and an optional highlights.
|
--- The displayer can return values, string and an optional highlights. The string
|
||||||
--- String is all the text to be displayed for this entry as a single string. If
|
--- is all the text to be displayed for this entry as a single string. If parts of
|
||||||
--- parts of the string are to be highlighted they will be described in the
|
--- the string are to be highlighted they will be described in the highlights
|
||||||
--- highlights table.
|
--- table.
|
||||||
---
|
---
|
||||||
--- For better understanding of how create() and displayer are used it's best to look
|
--- For a better understanding of how create() and displayer are used it's best to look
|
||||||
--- at the code in make_entry.lua.
|
--- at the code in make_entry.lua.
|
||||||
---@brief ]]
|
---@brief ]]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user