mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Add elm treesitter textobjects (#6084)
This commit is contained in:
parent
a4049e6f55
commit
98a3d46912
@ -30,7 +30,7 @@
|
||||
| eex | ✓ | | | |
|
||||
| ejs | ✓ | | | |
|
||||
| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
|
||||
| elm | ✓ | | | `elm-language-server` |
|
||||
| elm | ✓ | ✓ | | `elm-language-server` |
|
||||
| elvish | ✓ | | | `elvish` |
|
||||
| env | ✓ | | | |
|
||||
| erb | ✓ | | | |
|
||||
|
63
runtime/queries/elm/textobjects.scm
Normal file
63
runtime/queries/elm/textobjects.scm
Normal file
@ -0,0 +1,63 @@
|
||||
(line_comment) @comment.inside
|
||||
(line_comment)+ @comment.around
|
||||
(block_comment) @comment.inside
|
||||
(block_comment)+ @comment.around
|
||||
|
||||
((type_annotation)?
|
||||
(value_declaration
|
||||
(function_declaration_left (lower_case_identifier))
|
||||
(eq)
|
||||
(_) @function.inside
|
||||
)
|
||||
) @function.around
|
||||
|
||||
(parenthesized_expr
|
||||
(anonymous_function_expr
|
||||
(
|
||||
(arrow)
|
||||
(_) @function.inside
|
||||
)
|
||||
)
|
||||
) @function.around
|
||||
|
||||
(value_declaration
|
||||
(function_declaration_left
|
||||
(lower_pattern
|
||||
(lower_case_identifier) @parameter.inside @parameter.around
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(value_declaration
|
||||
(function_declaration_left
|
||||
(pattern) @parameter.inside @parameter.around
|
||||
)
|
||||
)
|
||||
|
||||
(value_declaration
|
||||
(function_declaration_left
|
||||
(tuple_pattern
|
||||
(pattern) @parameter.inside
|
||||
) @parameter.around
|
||||
)
|
||||
)
|
||||
|
||||
(value_declaration
|
||||
(function_declaration_left
|
||||
(record_pattern
|
||||
(lower_pattern
|
||||
(lower_case_identifier) @parameter.inside
|
||||
)
|
||||
) @parameter.around
|
||||
)
|
||||
)
|
||||
|
||||
(parenthesized_expr
|
||||
(anonymous_function_expr
|
||||
(
|
||||
(backslash)
|
||||
(pattern) @parameter.inside
|
||||
(arrow)
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user