Skip to content

Commit 516b4eb

Browse files
committed
feat(starlark): add function, loop, and conditional textobjects
1 parent 0f051e9 commit 516b4eb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

queries/starlark/textobjects.scm

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(function_definition
2+
body: (block)? @function.inner) @function.outer
3+
4+
(while_statement
5+
body: (block)? @loop.inner) @loop.outer
6+
7+
(for_statement
8+
body: (block)? @loop.inner) @loop.outer
9+
10+
(if_statement
11+
alternative: (_
12+
(_) @conditional.inner)?) @conditional.outer
13+
14+
(if_statement
15+
consequence: (block)? @conditional.inner)
16+
17+
(if_statement
18+
condition: (_) @conditional.inner)

0 commit comments

Comments
 (0)