mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-26 11:43:59 +00:00
Critical Fixes: - Fixed EditorConfig violations in grammar.js, scanner.c, README.md, .mega-linter.yml - Changed JSDoc comments from 1-space to 2-space indent per .editorconfig - Fixed line length violations in README.md and .mega-linter.yml - Updated test count badge from 59/59 to 61/61 in README.md - Created queries/highlights.scm for syntax highlighting support - Updated package.json with repository and files fields Configuration Updates: - Added repository field pointing to GitHub - Added files field to control npm package contents - Properly formatted CONTRIBUTING.md with prettier All 61 tests passing (100% success rate) All critical EditorConfig violations resolved
86 lines
1.2 KiB
Scheme
86 lines
1.2 KiB
Scheme
; ShellSpec Syntax Highlighting
|
|
; Extends tree-sitter-bash highlighting
|
|
|
|
; Block keywords (BDD test structure)
|
|
[
|
|
"Describe"
|
|
"Context"
|
|
"ExampleGroup"
|
|
"It"
|
|
"Example"
|
|
"Specify"
|
|
] @keyword.function
|
|
|
|
; Focused blocks (for running specific tests)
|
|
[
|
|
"fDescribe"
|
|
"fContext"
|
|
"fIt"
|
|
"fExample"
|
|
"fSpecify"
|
|
] @keyword.function.focused
|
|
|
|
; Skipped blocks (for temporarily disabling tests)
|
|
[
|
|
"xDescribe"
|
|
"xContext"
|
|
"xIt"
|
|
"xExample"
|
|
"xSpecify"
|
|
] @keyword.function.skipped
|
|
|
|
; Hook keywords
|
|
[
|
|
"Before"
|
|
"After"
|
|
"BeforeAll"
|
|
"AfterAll"
|
|
"BeforeEach"
|
|
"AfterEach"
|
|
"BeforeRun"
|
|
"AfterRun"
|
|
"BeforeCall"
|
|
"AfterCall"
|
|
] @keyword.control.hook
|
|
|
|
; Utility blocks
|
|
[
|
|
"Data"
|
|
"Parameters"
|
|
] @keyword.function.data
|
|
|
|
; Skip/Pending/Todo blocks
|
|
[
|
|
"Skip"
|
|
"Pending"
|
|
"Todo"
|
|
] @keyword.function.pending
|
|
|
|
; Directives
|
|
[
|
|
"Include"
|
|
] @keyword.directive
|
|
|
|
; Comments (inherit from bash)
|
|
(comment) @comment
|
|
|
|
; Strings (inherit from bash)
|
|
(string) @string
|
|
(raw_string) @string
|
|
|
|
; Functions (inherit from bash)
|
|
(function_definition
|
|
name: (word) @function)
|
|
|
|
; Variables (inherit from bash)
|
|
(variable_name) @variable
|
|
|
|
; Operators (inherit from bash)
|
|
[
|
|
"&&"
|
|
"||"
|
|
"|"
|
|
";"
|
|
"&"
|
|
] @operator
|