Skip to content

Commit f4e9507

Browse files
committed
(all) Update help to highlight code inside lists with tree-sitter on.
Details: - neovim/tree-sitter-vimdoc#118
1 parent 4fc7c1e commit f4e9507

10 files changed

+68
-72
lines changed

doc/mini-ai.txt

+10-11
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,16 @@ Textobject specification has a structure of composed pattern (see
250250
arguments as |MiniAi.find_textobject()| and should return one of:
251251
- Composed pattern. Useful for implementing user input. Example of
252252
simplified variant of textobject for function call with name taken
253-
from user prompt:
254-
>
253+
from user prompt: >
254+
255255
function()
256256
local left_edge = vim.pesc(vim.fn.input('Function name: '))
257257
return { string.format('%s+%%b()', left_edge), '^.-%(().*()%)$' }
258258
end
259259
<
260260
- Single output region. Useful to allow full control over
261-
textobject. Will be taken as is. Example of returning whole buffer:
262-
>
261+
textobject. Will be taken as is. Example of returning whole buffer: >
262+
263263
function()
264264
local from = { line = 1, col = 1 }
265265
local to = {
@@ -273,8 +273,8 @@ Textobject specification has a structure of composed pattern (see
273273
instruments, like treesitter (see |MiniAi.gen_spec.treesitter()|).
274274
The best region will be picked in the same manner as with composed
275275
pattern (respecting options `n_lines`, `search_method`, etc.).
276-
Example of selecting "best" line with display width more than 80:
277-
>
276+
Example of selecting "best" line with display width more than 80: >
277+
278278
function(_, _, _)
279279
local res = {}
280280
for i = 1, vim.api.nvim_buf_line_count(0) do
@@ -297,8 +297,8 @@ Textobject specification has a structure of composed pattern (see
297297
!IMPORTANT NOTE!: it means that output's `from` shouldn't be strictly
298298
to the left of `init` (it will lead to infinite loop). Not allowed as
299299
last item (as it should be pattern with captures).
300-
Example of matching only balanced parenthesis with big enough width:
301-
>
300+
Example of matching only balanced parenthesis with big enough width: >
301+
302302
{
303303
'%b()',
304304
function(s, init)
@@ -307,7 +307,7 @@ Textobject specification has a structure of composed pattern (see
307307
end,
308308
'^.().*().$'
309309
}
310-
>
310+
<
311311
More examples:
312312
- See |MiniAi.gen_spec| for function wrappers to create commonly used
313313
textobject specifications.
@@ -711,8 +711,7 @@ Example configuration for function definition textobject with
711711
})
712712
}
713713
})
714-
>
715-
714+
<
716715
Notes:
717716
- By default query is done using 'nvim-treesitter' plugin if it is present
718717
(falls back to builtin methods otherwise). This allows for a more

doc/mini-align.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,14 @@ Each modifier function:
488488
- Has signature `(steps, opts)` and should modify any of its input in place.
489489

490490
Examples:
491-
- Modifier function used for default 'i' modifier:
492-
>
491+
- Modifier function used for default 'i' modifier: >
492+
493493
function(steps, _)
494494
table.insert(steps.pre_split, MiniAlign.gen_step.ignore_split())
495495
end
496496
<
497-
- Tweak 't' modifier to use highest indentation instead of keeping it:
498-
>
497+
- Tweak 't' modifier to use highest indentation instead of keeping it: >
498+
499499
require('mini.align').setup({
500500
modifiers = {
501501
t = function(steps, _)
@@ -506,8 +506,8 @@ Examples:
506506
})
507507
<
508508
- Tweak `j` modifier to cycle through available "justify_side" option
509-
values (like in 'junegunn/vim-easy-align'):
510-
>
509+
values (like in 'junegunn/vim-easy-align'): >
510+
511511
require('mini.align').setup({
512512
modifiers = {
513513
j = function(_, opts)
@@ -536,8 +536,8 @@ For more details about options see |MiniAlign.align_strings()| and entries of
536536
alignment process.
537537

538538
Examples:
539-
- Align by default only first pair of columns:
540-
>
539+
- Align by default only first pair of columns: >
540+
541541
local align = require('mini.align')
542542
align.setup({
543543
steps = {

doc/mini-cursorword.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ highlighting update.
5757
Module-specific disabling:
5858
- Don't show highlighting if cursor is on the word that is in a blocklist
5959
of current filetype. In this example, blocklist for "lua" is "local" and
60-
"require" words, for "javascript" - "import":
61-
>
60+
"require" words, for "javascript" - "import": >
61+
6262
_G.cursorword_blocklist = function()
6363
local curword = vim.fn.expand('<cword>')
6464
local filetype = vim.bo.filetype

doc/mini-indentscope.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ Default values:
175175
It also controls how empty lines are treated: they are included in scope
176176
only if followed by a border. Another way of looking at it is that indent
177177
of blank line is computed based on value of `border` option.
178-
Here is an illustration of how `border` works in presence of empty lines:
179-
>
178+
Here is an illustration of how `border` works in presence of empty lines: >
179+
180180
|both|bottom|top|none|
181181
1|function foo() | 0 | 0 | 0 | 0 |
182182
2| | 4 | 0 | 4 | 0 |
@@ -196,8 +196,8 @@ Default values:
196196
computation of scope. If `true`, reference indent is a minimum of
197197
reference line's indent and cursor column. In main example, here how
198198
scope's body range differs depending on cursor column and `indent_at_cursor`
199-
value (assuming cursor is on line 3 and it is whole buffer):
200-
>
199+
value (assuming cursor is on line 3 and it is whole buffer): >
200+
201201
Column\Option true|false
202202
1 and 2 2-5 | 2-4
203203
3 and more 2-4 | 2-4

doc/mini-surround.txt

+10-11
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,17 @@ Specification for input surrounding has a structure of composed pattern
285285
arguments and should return one of:
286286
- Composed pattern. Useful for implementing user input. Example of
287287
simplified variant of input surrounding for function call with
288-
name taken from user prompt:
289-
>
288+
name taken from user prompt: >
289+
290290
function()
291291
local left_edge = vim.pesc(vim.fn.input('Function name: '))
292292
return { string.format('%s+%%b()', left_edge), '^.-%(().*()%)$' }
293293
end
294294
<
295295
- Single region pair (see |MiniSurround-glossary|). Useful to allow
296296
full control over surrounding. Will be taken as is. Example of
297-
returning first and last lines of a buffer:
298-
>
297+
returning first and last lines of a buffer: >
298+
299299
function()
300300
local n_lines = vim.fn.line('$')
301301
return {
@@ -315,8 +315,8 @@ Specification for input surrounding has a structure of composed pattern
315315
best region pair will be picked in the same manner as with composed
316316
pattern (respecting options `n_lines`, `search_method`, etc.) using
317317
output region (from start of left region to end of right region).
318-
Example using edges of "best" line with display width more than 80:
319-
>
318+
Example using edges of "best" line with display width more than 80: >
319+
320320
function()
321321
local make_line_region_pair = function(n)
322322
local left = { line = n, col = 1 }
@@ -343,8 +343,8 @@ Specification for input surrounding has a structure of composed pattern
343343
!IMPORTANT NOTE!: it means that output's `from` shouldn't be strictly
344344
to the left of `init` (it will lead to infinite loop). Not allowed as
345345
last item (as it should be pattern with captures).
346-
Example of matching only balanced parenthesis with big enough width:
347-
>
346+
Example of matching only balanced parenthesis with big enough width: >
347+
348348
{
349349
'%b()',
350350
function(s, init)
@@ -353,7 +353,7 @@ Specification for input surrounding has a structure of composed pattern
353353
end,
354354
'^.().*().$'
355355
}
356-
>
356+
<
357357
More examples:
358358
- See |MiniSurround.gen_spec| for function wrappers to create commonly used
359359
surrounding specifications.
@@ -769,8 +769,7 @@ Example configuration for function definition textobject with
769769
f = ts_input({ outer = '@call.outer', inner = '@call.inner' }),
770770
}
771771
})
772-
>
773-
772+
<
774773
Notes:
775774
- By default query is done using 'nvim-treesitter' plugin if it is present
776775
(falls back to builtin methods otherwise). This allows for a more

lua/mini/ai.lua

+10-11
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,16 @@
246246
--- arguments as |MiniAi.find_textobject()| and should return one of:
247247
--- - Composed pattern. Useful for implementing user input. Example of
248248
--- simplified variant of textobject for function call with name taken
249-
--- from user prompt:
250-
--- >
249+
--- from user prompt: >
250+
---
251251
--- function()
252252
--- local left_edge = vim.pesc(vim.fn.input('Function name: '))
253253
--- return { string.format('%s+%%b()', left_edge), '^.-%(().*()%)$' }
254254
--- end
255255
--- <
256256
--- - Single output region. Useful to allow full control over
257-
--- textobject. Will be taken as is. Example of returning whole buffer:
258-
--- >
257+
--- textobject. Will be taken as is. Example of returning whole buffer: >
258+
---
259259
--- function()
260260
--- local from = { line = 1, col = 1 }
261261
--- local to = {
@@ -269,8 +269,8 @@
269269
--- instruments, like treesitter (see |MiniAi.gen_spec.treesitter()|).
270270
--- The best region will be picked in the same manner as with composed
271271
--- pattern (respecting options `n_lines`, `search_method`, etc.).
272-
--- Example of selecting "best" line with display width more than 80:
273-
--- >
272+
--- Example of selecting "best" line with display width more than 80: >
273+
---
274274
--- function(_, _, _)
275275
--- local res = {}
276276
--- for i = 1, vim.api.nvim_buf_line_count(0) do
@@ -293,8 +293,8 @@
293293
--- !IMPORTANT NOTE!: it means that output's `from` shouldn't be strictly
294294
--- to the left of `init` (it will lead to infinite loop). Not allowed as
295295
--- last item (as it should be pattern with captures).
296-
--- Example of matching only balanced parenthesis with big enough width:
297-
--- >
296+
--- Example of matching only balanced parenthesis with big enough width: >
297+
---
298298
--- {
299299
--- '%b()',
300300
--- function(s, init)
@@ -303,7 +303,7 @@
303303
--- end,
304304
--- '^.().*().$'
305305
--- }
306-
--- >
306+
--- <
307307
--- More examples:
308308
--- - See |MiniAi.gen_spec| for function wrappers to create commonly used
309309
--- textobject specifications.
@@ -894,8 +894,7 @@ end
894894
--- })
895895
--- }
896896
--- })
897-
--- >
898-
---
897+
--- <
899898
--- Notes:
900899
--- - By default query is done using 'nvim-treesitter' plugin if it is present
901900
--- (falls back to builtin methods otherwise). This allows for a more

lua/mini/align.lua

+8-8
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,14 @@ end
442442
--- - Has signature `(steps, opts)` and should modify any of its input in place.
443443
---
444444
--- Examples:
445-
--- - Modifier function used for default 'i' modifier:
446-
--- >
445+
--- - Modifier function used for default 'i' modifier: >
446+
---
447447
--- function(steps, _)
448448
--- table.insert(steps.pre_split, MiniAlign.gen_step.ignore_split())
449449
--- end
450450
--- <
451-
--- - Tweak 't' modifier to use highest indentation instead of keeping it:
452-
--- >
451+
--- - Tweak 't' modifier to use highest indentation instead of keeping it: >
452+
---
453453
--- require('mini.align').setup({
454454
--- modifiers = {
455455
--- t = function(steps, _)
@@ -460,8 +460,8 @@ end
460460
--- })
461461
--- <
462462
--- - Tweak `j` modifier to cycle through available "justify_side" option
463-
--- values (like in 'junegunn/vim-easy-align'):
464-
--- >
463+
--- values (like in 'junegunn/vim-easy-align'): >
464+
---
465465
--- require('mini.align').setup({
466466
--- modifiers = {
467467
--- j = function(_, opts)
@@ -490,8 +490,8 @@ end
490490
--- alignment process.
491491
---
492492
--- Examples:
493-
--- - Align by default only first pair of columns:
494-
--- >
493+
--- - Align by default only first pair of columns: >
494+
---
495495
--- local align = require('mini.align')
496496
--- align.setup({
497497
--- steps = {

lua/mini/cursorword.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
--- Module-specific disabling:
5858
--- - Don't show highlighting if cursor is on the word that is in a blocklist
5959
--- of current filetype. In this example, blocklist for "lua" is "local" and
60-
--- "require" words, for "javascript" - "import":
61-
--- >
60+
--- "require" words, for "javascript" - "import": >
61+
---
6262
--- _G.cursorword_blocklist = function()
6363
--- local curword = vim.fn.expand('<cword>')
6464
--- local filetype = vim.bo.filetype

lua/mini/indentscope.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ end
139139
--- It also controls how empty lines are treated: they are included in scope
140140
--- only if followed by a border. Another way of looking at it is that indent
141141
--- of blank line is computed based on value of `border` option.
142-
--- Here is an illustration of how `border` works in presence of empty lines:
143-
--- >
142+
--- Here is an illustration of how `border` works in presence of empty lines: >
143+
---
144144
--- |both|bottom|top|none|
145145
--- 1|function foo() | 0 | 0 | 0 | 0 |
146146
--- 2| | 4 | 0 | 4 | 0 |
@@ -160,8 +160,8 @@ end
160160
--- computation of scope. If `true`, reference indent is a minimum of
161161
--- reference line's indent and cursor column. In main example, here how
162162
--- scope's body range differs depending on cursor column and `indent_at_cursor`
163-
--- value (assuming cursor is on line 3 and it is whole buffer):
164-
--- >
163+
--- value (assuming cursor is on line 3 and it is whole buffer): >
164+
---
165165
--- Column\Option true|false
166166
--- 1 and 2 2-5 | 2-4
167167
--- 3 and more 2-4 | 2-4

lua/mini/surround.lua

+10-11
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,17 @@
281281
--- arguments and should return one of:
282282
--- - Composed pattern. Useful for implementing user input. Example of
283283
--- simplified variant of input surrounding for function call with
284-
--- name taken from user prompt:
285-
--- >
284+
--- name taken from user prompt: >
285+
---
286286
--- function()
287287
--- local left_edge = vim.pesc(vim.fn.input('Function name: '))
288288
--- return { string.format('%s+%%b()', left_edge), '^.-%(().*()%)$' }
289289
--- end
290290
--- <
291291
--- - Single region pair (see |MiniSurround-glossary|). Useful to allow
292292
--- full control over surrounding. Will be taken as is. Example of
293-
--- returning first and last lines of a buffer:
294-
--- >
293+
--- returning first and last lines of a buffer: >
294+
---
295295
--- function()
296296
--- local n_lines = vim.fn.line('$')
297297
--- return {
@@ -311,8 +311,8 @@
311311
--- best region pair will be picked in the same manner as with composed
312312
--- pattern (respecting options `n_lines`, `search_method`, etc.) using
313313
--- output region (from start of left region to end of right region).
314-
--- Example using edges of "best" line with display width more than 80:
315-
--- >
314+
--- Example using edges of "best" line with display width more than 80: >
315+
---
316316
--- function()
317317
--- local make_line_region_pair = function(n)
318318
--- local left = { line = n, col = 1 }
@@ -339,8 +339,8 @@
339339
--- !IMPORTANT NOTE!: it means that output's `from` shouldn't be strictly
340340
--- to the left of `init` (it will lead to infinite loop). Not allowed as
341341
--- last item (as it should be pattern with captures).
342-
--- Example of matching only balanced parenthesis with big enough width:
343-
--- >
342+
--- Example of matching only balanced parenthesis with big enough width: >
343+
---
344344
--- {
345345
--- '%b()',
346346
--- function(s, init)
@@ -349,7 +349,7 @@
349349
--- end,
350350
--- '^.().*().$'
351351
--- }
352-
--- >
352+
--- <
353353
--- More examples:
354354
--- - See |MiniSurround.gen_spec| for function wrappers to create commonly used
355355
--- surrounding specifications.
@@ -947,8 +947,7 @@ MiniSurround.gen_spec = { input = {}, output = {} }
947947
--- f = ts_input({ outer = '@call.outer', inner = '@call.inner' }),
948948
--- }
949949
--- })
950-
--- >
951-
---
950+
--- <
952951
--- Notes:
953952
--- - By default query is done using 'nvim-treesitter' plugin if it is present
954953
--- (falls back to builtin methods otherwise). This allows for a more

0 commit comments

Comments
 (0)