Skip to content

Commit 54af31b

Browse files
feat: add brackets.scm
The queries in brackets.scm allow a vim users to jump between the start and end of a set of closed elements -- string literals, liquid expressions, etc.
1 parent ab9d28f commit 54af31b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

languages/liquid/brackets.scm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
("{{" @open "}}" @close)
2+
("{{-" @open "-}}" @close)
3+
("{%" @open "%}" @close)
4+
("{%-" @open "-%}" @close)
5+
("'" @open "'" @close)
6+
("\"" @open "\"" @close)

languages/liquid/config.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name = "Liquid"
22
grammar = "liquid"
33
path_suffixes = ["liquid"]
4-
4+
brackets = [
5+
{ start = "{{", end = "}}", close = true, newline = false },
6+
{ start = "{{-", end = "-}}", close = true, newline = false },
7+
{ start = "{%", end = "%}", close = true, newline = false },
8+
{ start = "{%-", end = "-%}", close = true, newline = false },
9+
]
510
block_comment = ["{% comment %}", "{% endcomment %}"]
11+
documentation = { start = "{% doc %}", end = "{% enddoc %}", prefix = " ", tab_size = 1 }

0 commit comments

Comments
 (0)