Skip to content

Commit

Permalink
Auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
atticus-sullivan authored and github-actions[bot] committed Oct 8, 2022
1 parent 9b473f2 commit 014ce2c
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 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.5.0 Last change: 2022 September 28
*luasnip.txt* For NVIM v0.5.0 Last change: 2022 October 08

==============================================================================
Table of Contents *luasnip-table-of-contents*
Expand Down Expand Up @@ -1049,6 +1049,31 @@ is only a short outline, their usage is shown more expansively in
<



- `conditions.show`: Contains typical predicats/functions used as
`show`-condition. Currently this is just `line_end`
- `conditions.expand`: Contains typical predicats/functions used as
`expand`-condition. Currently this is just `line_begin` Contains everything
from `conditions.show` as well.
- `conditions`: Provides a function `make_condition(foo)` which takes a function
as argument and returns a _condition object_ for which several operators are
defined:
- `c1 + c2 -> c1 or c2`
- `c1 * c2 -> c1 and c2`
- `-c1 -> not c1`
- `c1 ^ c2 -> c1 xor/!= c2`
- `c1 % c2 -> c1 xnor/== c2`: This decision may look weird but as we weren’t
able to use `==`, we decided to take something that makes one scratch ones
head (and thus avoid making false assumptions).
For more details look at this comment <https://github.com/L3MON4D3/LuaSnip/pull/612#issuecomment-1264487743>.
`conditions.show`s and `conditions.expand`s members all are also condition
objects so you can work with those too.
Thus you can easily combine existing predicats. Like in
`conditions.expand.line_end + conditions.expand.line_begin` instead of doing
something like `function(...) return conditions.expand.line_end(...) or
conditions.expand.line_begin(...) end`.


FMT *luasnip-fmt*

`require("luasnip.extras.fmt").fmt` can be used to create snippets in a more
Expand Down

0 comments on commit 014ce2c

Please sign in to comment.