Skip to content

Commit 3ad9d45

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

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

doc/mini-ai.txt

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

lua/mini/ai.lua

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

0 commit comments

Comments
 (0)