Skip to content

Commit f4615dd

Browse files
doc stuff
1 parent 73fc3f7 commit f4615dd

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

DOC.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,9 +1071,16 @@ ls.add_snippets("all", {
10711071
Contains everything from `conditions.show` as well.
10721072
- `conditions`: Provides a function `make_condition(foo)` which takes a function
10731073
as argument and returns a *condition object* for which several operators are
1074-
defined: `c1 + c2 -> c1 or c2`, `c1 * c2 -> c1 and c2`, `-c1 -> not c1`,
1075-
`c1 ^ c2 -> c1 xor/!= c2`, `c1 % c2 -> c1 xnor/== c2`. Thus you can easily
1076-
combine existing predicats. Like in
1074+
defined:
1075+
- `c1 + c2 -> c1 or c2`
1076+
- `c1 * c2 -> c1 and c2`
1077+
- `-c1 -> not c1`
1078+
- `c1 ^ c2 -> c1 xor/!= c2`
1079+
- `c1 % c2 -> c1 xnor/== c2`: This decision may look weird but as we weren't
1080+
able to use `==`, we decided to take something that makes one scratch ones
1081+
head (and thus avoid making false assumptions). For more details look at
1082+
[this comment](https://github.com/L3MON4D3/LuaSnip/pull/612#issuecomment-1264487743)
1083+
Thus you can easily combine existing predicats. Like in
10771084
`conditions.expand.line_end + conditions.expand.line_begin` instead of doing
10781085
something like
10791086
`function(...) return conditions.expand.line_end(...) or conditions.expand.line_begin(...) end`.

0 commit comments

Comments
 (0)