Skip to content

Commit 5ceb6a1

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

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

doc/mini-surround.txt

Lines changed: 10 additions & 11 deletions
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/surround.lua

Lines changed: 10 additions & 11 deletions
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)