mirror of
https://github.com/ivuorinen/shellspec-zed.git
synced 2026-01-26 11:14:05 +00:00
39 lines
971 B
Scheme
39 lines
971 B
Scheme
; Indent content inside BDD blocks
|
|
(simple_command
|
|
(command_name) @_name
|
|
(#match? @_name "^(Describe|Context|ExampleGroup|It|Specify|Example)$")) @indent
|
|
|
|
; Indent prefixed blocks
|
|
(simple_command
|
|
(command_name) @_name
|
|
(#match? @_name "^[xf](Describe|Context|ExampleGroup|It|Specify|Example)$")) @indent
|
|
|
|
; Indent hook content
|
|
(simple_command
|
|
(command_name) @_name
|
|
(#match? @_name "^(BeforeEach|AfterEach|BeforeAll|AfterAll|BeforeCall|AfterCall|BeforeRun|AfterRun)$")) @indent
|
|
|
|
; Indent Data blocks
|
|
(simple_command
|
|
(command_name) @_name
|
|
(#match? @_name "^(Data|Parameters)$")) @indent
|
|
|
|
; Indent function definitions
|
|
(function_definition) @indent
|
|
|
|
; Indent compound statements
|
|
(compound_statement) @indent
|
|
|
|
; Indent conditional statements
|
|
(if_statement) @indent
|
|
(for_statement) @indent
|
|
(while_statement) @indent
|
|
|
|
; Indent pipeline continuations
|
|
(pipeline) @indent
|
|
|
|
; Dedent End keyword
|
|
(simple_command
|
|
(command_name) @_name
|
|
(#eq? @_name "End")) @dedent
|