Skip to content

Commit

Permalink
(all) Use universally ~ to indicate help section heading.
Browse files Browse the repository at this point in the history
  • Loading branch information
echasnovski committed Dec 17, 2023
1 parent 19bd11b commit ea1af8c
Show file tree
Hide file tree
Showing 69 changed files with 807 additions and 807 deletions.
36 changes: 18 additions & 18 deletions doc/mini-ai.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ What it doesn't (and probably won't) do:
in 'targets.vim'). Whitespace handling is assumed to be done inside
textobject specification (like `i(` and `i)` handle whitespace differently).

# Setup~
# Setup ~

This module needs a setup with `require('mini.ai').setup({})` (replace
`{}` with your `config` table). It will create global Lua table `MiniAi`
Expand All @@ -73,7 +73,7 @@ as `MiniAi.config`. See |mini.nvim-buffer-local-config| for more details.

To stop module from showing non-error feedback, set `config.silent = true`.

# Comparisons~
# Comparisons ~

- 'wellle/targets.vim':
- Has limited support for creating own textobjects: it is constrained
Expand Down Expand Up @@ -103,7 +103,7 @@ To stop module from showing non-error feedback, set `config.silent = true`.
- Doesn't support multiple search method (basically, only 'cover').
- Doesn't support consecutive application of target textobject.

# Disabling~
# Disabling ~

To disable, set `vim.g.miniai_disable` (globally) or `vim.b.miniai_disable`
(for a buffer) to `true`. Considering high number of different scenarios
Expand All @@ -113,7 +113,7 @@ recipes.

------------------------------------------------------------------------------
*MiniAi-textobject-builtin*
Builtin textobjects~
Builtin textobjects ~

This table describes all builtin textobjects along with what they
represent. Explanation:
Expand Down Expand Up @@ -383,10 +383,10 @@ Notes:
`MiniAi.setup`({config})
Module setup

Parameters~
Parameters ~
{config} `(table|nil)` Module config table. See |MiniAi.config|.

Usage~
Usage ~
`require('mini.ai').setup({})` (replace `{}` with your `config` table)

------------------------------------------------------------------------------
Expand Down Expand Up @@ -477,7 +477,7 @@ Examples:
<
There are more example specifications in |MiniAi-textobject-specification|.

## Search method~
## Search method ~

Value of `config.search_method` defines how best match search is done.
Based on its value, one of the following matches will be selected:
Expand Down Expand Up @@ -518,7 +518,7 @@ Here is an example of what `a)` textobject is based on a value of
- `'prev'`: `(a) bbb (c)` -> `(a)`. Same outcome for `(bbb)`.
- `'nearest'`: depends on cursor position (same as in `'cover_or_nearest'`).

## Mappings~
## Mappings ~

Mappings `around_next`/`inside_next` and `around_last`/`inside_last` are
essentially `around`/`inside` but using search method `'next'` and `'prev'`.
Expand All @@ -528,7 +528,7 @@ essentially `around`/`inside` but using search method `'next'` and `'prev'`.
`MiniAi.find_textobject`({ai_type}, {id}, {opts})
Find textobject region

Parameters~
Parameters ~
{ai_type} `(string)` One of `'a'` or `'i'`.
{id} `(string)` Single character string representing textobject id. It is
used to get specification which is later used to compute textobject region.
Expand All @@ -545,7 +545,7 @@ Parameters~
Default: empty region at cursor position.
- <search_method> - Search method. Default: `config.search_method`.

Return~
Return ~
`(table|nil)` Region of textobject or `nil` if no textobject different
from `opts.reference_region` was consecutively found `opts.n_times` times.

Expand All @@ -554,7 +554,7 @@ Return~
`MiniAi.move_cursor`({side}, {ai_type}, {id}, {opts})
Move cursor to edge of textobject

Parameters~
Parameters ~
{side} `(string)` One of `'left'` or `'right'`.
{ai_type} `(string)` One of `'a'` or `'i'`.
{id} `(string)` Single character string representing textobject id.
Expand Down Expand Up @@ -603,7 +603,7 @@ Examples:
- `argument({ exclude_regions = { '%b()' } })` will exclude separators
which are inside balanced `()` (inside outer brackets).

Parameters~
Parameters ~
{opts} `(table|nil)` Options. Allowed fields:
- <brackets> - array of patterns for outer balanced brackets.
Default: `{ '%b()', '%b[]', '%b{}' }` (any `()`, `[]`, or `{}` can
Expand Down Expand Up @@ -634,7 +634,7 @@ Example:
- `function_call({ name_pattern = '[%w_]' })` will recognize function name with
only alphanumeric or underscore (not dot).

Parameters~
Parameters ~
{opts} `(table|nil)` Optsion. Allowed fields:
- <name_pattern> - string pattern of character set allowed in function name.
Default: `'[%w_%.]'` (alphanumeric, underscore, or dot).
Expand Down Expand Up @@ -662,7 +662,7 @@ both `left` and `right`:
consecutively selects '__a__' and '__b_'. Note: both `left` and `right`
should be single character.

Parameters~
Parameters ~
{left} `(string)` Left edge.
{right} `(string)` Right edge.
{opts} `(table|nil)` Options. Possible fields:
Expand Down Expand Up @@ -722,7 +722,7 @@ Notes:
fast though (one search should be magnitude of milliseconds or tens of
milliseconds on really large file).

Parameters~
Parameters ~
{ai_captures} `(table)` Captures for `a` and `i` textobjects: table with
<a> and <i> fields with captures for `a` and `i` textobjects respectively.
Each value can be either a string capture (should start with `'@'`) or an
Expand All @@ -733,12 +733,12 @@ Parameters~
cost of increased execution time. Provides more coherent experience if
'nvim-treesitter-textobjects' queries are used. Default: `true`.

Return~
Return ~
`(function)` Function with |MiniAi.find_textobject()| signature which
returns array of current buffer regions representing matches for
corresponding (`a` or `i`) treesitter capture.

See also~
See also ~
|MiniAi-textobject-specification| for how this type of textobject
specification is processed.
|get_query()| for how query is fetched in case of no 'nvim-treesitter'.
Expand All @@ -752,7 +752,7 @@ Visually select textobject region

Does nothing if no region is found.

Parameters~
Parameters ~
{ai_type} `(string)` One of `'a'` or `'i'`.
{id} `(string)` Single character string representing textobject id.
{opts} `(table|nil)` Same as in |MiniAi.find_textobject()|. Extra fields:
Expand Down
52 changes: 26 additions & 26 deletions doc/mini-align.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Features:
- Every user interaction is accompanied with helper status message showing
relevant information about current alignment process.

# Setup~
# Setup ~

This module needs a setup with `require('mini.align').setup({})` (replace
`{}` with your `config` table). It will create global Lua table `MiniAlign`
Expand All @@ -54,7 +54,7 @@ as `MiniAlign.config`. See |mini.nvim-buffer-local-config| for more details.

To stop module from showing non-error feedback, set `config.silent = true`.

# Comparisons~
# Comparisons ~

- 'junegunn/vim-easy-align':
- 'mini.align' is mostly designed after 'junegunn/vim-easy-align', so
Expand Down Expand Up @@ -86,7 +86,7 @@ To stop module from showing non-error feedback, set `config.silent = true`.
desirable. 'mini.align' does not by design: use Visual selection or
textobject/motion to explicitly define region to align.

# Disabling~
# Disabling ~

To disable, set `vim.g.minialign_disable` (globally) or `vim.b.minialign_disable`
(for a buffer) to `true`. Considering high number of different scenarios
Expand Down Expand Up @@ -412,10 +412,10 @@ Key sequences:
`MiniAlign.setup`({config})
Module setup

Parameters~
Parameters ~
{config} `(table|nil)` Module config table. See |MiniAlign.config|.

Usage~
Usage ~
`require('mini.align').setup({})` (replace `{}` with your `config` table)

------------------------------------------------------------------------------
Expand Down Expand Up @@ -552,7 +552,7 @@ Align strings

For details about alignment process see |MiniAlign-algorithm|.

Parameters~
Parameters ~
{strings} `(table)` Array of strings.
{opts} `(table|nil)` Options. Its copy will be passed to steps as second
argument. Extended with `MiniAlign.config.options`.
Expand Down Expand Up @@ -586,7 +586,7 @@ Will use |MiniAlign.align_strings()| and set the following options in `opts`:
used to create more advanced steps.
- `mode` - mode of selection (see |MiniAlign-glossary|).

Parameters~
Parameters ~
{mode} `(string)` Selection mode. One of "char", "line", "block".

------------------------------------------------------------------------------
Expand All @@ -597,10 +597,10 @@ Convert 2d array of strings to parts
This function verifies if input is a proper 2d array of strings and adds
methods to its copy.

Class~
Class ~
{parts}

Fields~
Fields ~
{apply} `(function)` Takes callable `f` and applies it to every part.
Callable should have signature `(s, data)`: `s` is a string part,
`data` - table with its data (<row> has row number, <col> has column number).
Expand Down Expand Up @@ -647,7 +647,7 @@ Fields~
in a row). Value "keep" keeps it; "low" makes all indent equal to the
lowest across rows; "high" - highest across rows; "remove" - removes indent.

Usage~
Usage ~
>
parts = MiniAlign.as_parts({ { 'a', 'b' }, { 'c' } })
print(vim.inspect(parts.get_dims())) -- Should be { row = 2, col = 2 }
Expand All @@ -668,12 +668,12 @@ Create step
A step is basically a named callable object. Having a name bundled with
some action powers helper status message during interactive alignment process.

Parameters~
Parameters ~
{name} `(string)` Step name.
{action} `(function|table)` Step action. Should be a callable object
(see |vim.is_callable()|).

Return~
Return ~
`(table)` A table with keys: <name> with `name` argument, <action> with `action`.

------------------------------------------------------------------------------
Expand All @@ -695,7 +695,7 @@ Outputs of other elements depend on both step generator input values and
options supplied at execution. This design is mostly because their output
can be used several times in pre-steps.

Usage~
Usage ~
>
local align = require('mini.align')
align.setup({
Expand Down Expand Up @@ -741,10 +741,10 @@ Output uses following options (as part second argument, `opts` table):
- <split_exclude_patterns> - array of strings defining which regions to
exclude from being matched. Default: `{}`. Examples: `{ '".-"', '^%s*#.*' }`.

Return~
Return ~
`(table)` A step named "split" and with appropriate callable action.

See also~
See also ~
|MiniAlign.gen_step.ignore_split()| heavily uses `split_exclude_patterns`.

------------------------------------------------------------------------------
Expand Down Expand Up @@ -779,7 +779,7 @@ Output uses following options (as part second argument, `opts` table):
left edge is not on the first column. Default: array of zeros. Set
automatically during interactive alignment in charwise mode.

Return~
Return ~
`(table)` A step named "justify" and with appropriate callable action.

------------------------------------------------------------------------------
Expand All @@ -802,7 +802,7 @@ Output uses following options (as part second argument, `opts` table):
- <merge_delimiter> - string or array of strings. Default: `''`.
Examples: `' '`, `{ '', ' ' }`.

Return~
Return ~
`(table)` A step named "merge" and with appropriate callable action.

------------------------------------------------------------------------------
Expand Down Expand Up @@ -840,10 +840,10 @@ Tips:
- Filtering by last equal sign usually can be done with `n >= (N - 1)`
(because there is usually something to the right of it).

Parameters~
Parameters ~
{expr} `(string)` Lua expression as a string which will be used as predicate.

Return~
Return ~
`(table|nil)` A step named "filter" and with appropriate callable action.

------------------------------------------------------------------------------
Expand All @@ -854,18 +854,18 @@ Generate ignore step
Output adds certain values to `split_exclude_patterns` option. Should be
used as pre-split step.

Parameters~
Parameters ~
{patterns} `(table)` Array of patterns to be added to
`split_exclude_patterns` as is. Default: `{ [[".-"]] }` (excludes strings
for most cases).
{exclude_comment} `(boolean|nil)` Whether to add comment pattern to
`split_exclude_patterns`. Comment pattern is derived from 'commentstring'
option. Default: `true`.

Return~
Return ~
`(table)` A step named "ignore" and with appropriate callable action.

See also~
See also ~
|MiniAlign.gen_step.default_split()| for details about
`split_exclude_patterns` option.

Expand All @@ -877,11 +877,11 @@ Generate pair step
Output calls `pair()` method of parts (see |MiniAlign.as_parts()|) with
supplied `direction` argument.

Parameters~
Parameters ~
{direction} `(string)` Which direction to pair. One of "left" (default) or


Return~
Return ~
`(table)` A step named "pair" and with appropriate callable action.

------------------------------------------------------------------------------
Expand All @@ -892,13 +892,13 @@ Generate trim step
Output calls `trim()` method of parts (see |MiniAlign.as_parts()|) with
supplied `direction` and `indent` arguments.

Parameters~
Parameters ~
{direction} `(string|nil)` Which sides to trim whitespace. One of "both"
(default), "left", "right", "none".
{indent} `(string|nil)` What to do with possible indent (left whitespace
of first string in a row). One of "keep" (default), "low", "high", "remove".

Return~
Return ~
`(table)` A step named "trim" and with appropriate callable action.


Expand Down
Loading

0 comments on commit ea1af8c

Please sign in to comment.