From 3082b732c4e0aa16d17362f2f1b6039af30760d9 Mon Sep 17 00:00:00 2001 From: xudyang1 Date: Wed, 27 Nov 2024 22:13:35 +0000 Subject: [PATCH] Auto generate docs --- doc/luasnip.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/luasnip.txt b/doc/luasnip.txt index eda4437c..58a82778 100644 --- a/doc/luasnip.txt +++ b/doc/luasnip.txt @@ -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* @@ -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]] + })) }) < @@ -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).