Skip to content

Commit

Permalink
Auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xudyang1 committed Nov 27, 2024
1 parent e83f4a4 commit acc62eb
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion doc/luasnip.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*luasnip.txt* For NVIM v0.8.0 Last change: 2024 November 18
*luasnip.txt* For NVIM v0.8.0 Last change: 2024 November 27

==============================================================================
Table of Contents *luasnip-table-of-contents*
Expand Down Expand Up @@ -1459,6 +1459,23 @@ Simple example:
}, {
repeat_duplicates = true
}))
s("example5", fmt([[
line1: no indent

line3: two space -> 1 indent ('\t')
line4: 4 space -> 2 indent ('\t\t')
]], {}, {
indent_string = " "
}))
-- NOTE: [[\t]] means '\\t'
s("example6", fmt([[
line1: no indent

\tline3: '\\t' -> 1 indent ('\t')
\t\tline4: '\\t\\t' -> 2 indent ('\t\t')
]], {}, {
indent_string = [[\t]]
}))
})
<

Expand Down Expand Up @@ -1487,6 +1504,9 @@ any way, correspond to the jump-index of the nodes!
when passing multiline strings via `[[]]` (default true).
- `dedent`: remove indent common to all lines in `format`. Again, makes
passing multiline-strings a bit nicer (default true).
- `indent_string`: convert `indent_string` at beginning of each line to unit
indent (’). This is applied after `dedent`. Useful when using
multiline string in `fmt`. (default empty string, disabled)
- `repeat_duplicates`: repeat nodes when a key is reused instead of copying
the node if it has a jump-index, refer to |luasnip-basics-jump-index| to
know which nodes have a jump-index (default false).
Expand Down

0 comments on commit acc62eb

Please sign in to comment.