Skip to content

Commit

Permalink
restrict exit_roots documentation to config section
Browse files Browse the repository at this point in the history
  • Loading branch information
gokberkgunes committed Apr 20, 2024
1 parent 1bd2ebf commit 00eec7a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ Since there would almost always be more jumps if the roots are linked, regular
`<Tab>` would not work almost all the time, and thus `link_roots` has to stay
disabled.

If the snippet is not a child, but a root, it can be exited when reaching to
last node, `$0`, if `exit_roots` is enabled. This setting may avoid unexpected
behavior by disallowing to jump earlier (finished) snippets.

# Node

Every node accepts, as its last parameter, an optional table of arguments.
Expand Down Expand Up @@ -3506,8 +3502,11 @@ These are the settings you can provide to `luasnip.setup()`:
[Basics-Snippet-Insertion](#snippet-insertion) for more context.
- `link_roots`: Whether snippet-roots should be linked. See
[Basics-Snippet-Insertion](#snippet-insertion) for more context.
- `exit_roots`: Whether snippet-roots should exit at reaching at their `$0`.
See [Basics-Snippet-Insertion](#snippet-insertion) for more context.
- `exit_roots`: Whether snippet-roots should exit at reaching at their last
node, `$0`. This setting is only valid for root snippets, not child snippets.
This setting may avoid unexpected behavior by disallowing to jump earlier
(finished) snippets. Check [Basics-Snippet-Insertion](#snippet-insertion) for
more information on snippet-roots.
- `link_children`: Whether children should be linked. See
[Basics-Snippet-Insertion](#snippet-insertion) for more context.
- `history` (deprecated): if not nil, `keep_roots`, `link_roots`, and
Expand Down

0 comments on commit 00eec7a

Please sign in to comment.