mirror of
https://github.com/helix-editor/helix
synced 2026-08-05 14:42:57 +02:00
tree-sitter v0.26 can catch this as impossible. (It's possible, I suppose, but it relies on matching against an unnamed node, which should not really be a thing.)
35 lines
1.0 KiB
Scheme
35 lines
1.0 KiB
Scheme
(function_definition (_)? @function.inside) @function.around
|
|
|
|
; Short-form `f(x) = …` is now an assignment with a call_expression LHS.
|
|
((assignment . (call_expression)) @function.inside) @function.around
|
|
|
|
(macro_definition (_)? @function.inside) @function.around
|
|
|
|
(struct_definition (_)? @class.inside) @class.around
|
|
|
|
(abstract_definition (_)? @class.inside) @class.around
|
|
|
|
(primitive_definition (_)? @class.inside) @class.around
|
|
|
|
; Parameters and call arguments both live in argument_list now.
|
|
(argument_list
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
|
|
|
(curly_expression
|
|
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
|
|
|
(line_comment) @comment.inside
|
|
|
|
(line_comment)+ @comment.around
|
|
|
|
(block_comment) @comment.inside
|
|
|
|
(block_comment)+ @comment.around
|
|
|
|
(macrocall_expression (macro_identifier
|
|
(identifier) @_name
|
|
(#match? @_name "^(test|test_throws|test_logs|inferred|test_deprecated|test_warn|test_nowarn|test_broken|test_skip)$")
|
|
)
|
|
.
|
|
(macro_argument_list) @test.inside) @test.around
|