on master help sign in
Add elm treesitter textobjects (#6084)
98a3d46Mathieu Agopian
book/src/generated/lang-support.md+1−1
@@ -30,7 +30,7 @@
30| eex | ✓ | | | |
30| eex | ✓ | | | |
31| ejs | ✓ | | | |
31| ejs | ✓ | | | |
32| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
32| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
33−| elm | ✓ | | | `elm-language-server` |
33+| elm | ✓ | ✓ | | `elm-language-server` |
34| elvish | ✓ | | | `elvish` |
34| elvish | ✓ | | | `elvish` |
35| env | ✓ | | | |
35| env | ✓ | | | |
36| erb | ✓ | | | |
36| erb | ✓ | | | |
runtime/queries/elm/textobjects.scmnew file+63
@@ -0,0 +1,63 @@
1+(line_comment) @comment.inside
2+(line_comment)+ @comment.around
3+(block_comment) @comment.inside
4+(block_comment)+ @comment.around
5+
6+((type_annotation)?
7+ (value_declaration
8+ (function_declaration_left (lower_case_identifier))
9+ (eq)
10+ (_) @function.inside
11+ )
12+) @function.around
13+
14+(parenthesized_expr
15+ (anonymous_function_expr
16+ (
17+ (arrow)
18+ (_) @function.inside
19+ )
20+ )
21+) @function.around
22+
23+(value_declaration
24+ (function_declaration_left
25+ (lower_pattern
26+ (lower_case_identifier) @parameter.inside @parameter.around
27+ )
28+ )
29+)
30+
31+(value_declaration
32+ (function_declaration_left
33+ (pattern) @parameter.inside @parameter.around
34+ )
35+)
36+
37+(value_declaration
38+ (function_declaration_left
39+ (tuple_pattern
40+ (pattern) @parameter.inside
41+ ) @parameter.around
42+ )
43+)
44+
45+(value_declaration
46+ (function_declaration_left
47+ (record_pattern
48+ (lower_pattern
49+ (lower_case_identifier) @parameter.inside
50+ )
51+ ) @parameter.around
52+ )
53+)
54+
55+(parenthesized_expr
56+ (anonymous_function_expr
57+ (
58+ (backslash)
59+ (pattern) @parameter.inside
60+ (arrow)
61+ )
62+ )
63+)