Add initial support for SuperCollider (#9329)

This commit is contained in:
Phil 2024-03-18 12:13:23 +00:00 committed by GitHub
parent 4ffe993533
commit 94d210c9bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 96 additions and 0 deletions

View File

@ -170,6 +170,7 @@
| sshclientconfig | ✓ | | | |
| starlark | ✓ | ✓ | | |
| strace | ✓ | | | |
| supercollider | ✓ | | | |
| svelte | ✓ | | ✓ | `svelteserver` |
| sway | ✓ | ✓ | ✓ | `forc` |
| swift | ✓ | | | `sourcekit-lsp` |

View File

@ -3328,3 +3328,15 @@ grammar = "hyprlang"
[[grammar]]
name = "hyprlang"
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-hyprlang", rev = "27af9b74acf89fa6bed4fb8cb8631994fcb2e6f3"}
[[language]]
name = "supercollider"
scope = "source.supercollider"
injection-regex = "supercollider"
file-types = ["scd", "sc", "quark"]
comment-token = "//"
indent = { tab-width = 4, unit = "\t" }
[[grammar]]
name = "supercollider"
source = { git = "https://github.com/madskjeldgaard/tree-sitter-supercollider", rev = "3b35bd0fded4423c8fb30e9585c7bacbcd0e8095" }

View File

@ -0,0 +1,7 @@
[
(function_call)
(code_block)
(function_block)
(control_structure)
] @fold

View File

@ -0,0 +1,76 @@
(line_comment) @comment.line
(block_comment) @comment.block
(argument name: (identifier) @variable.parameter)
(local_var name: (identifier) @variable)
(environment_var name:(identifier) @variable.builtin)
(builtin_var) @constant.builtin
(function_definition name: (variable) @function)
(named_argument name: (identifier) @variable.other.member)
(method_call name: (method_name) @function.method)
(class) @keyword.storage.type
(number) @constant.numeric
(float) @constant.numeric.float
(string) @string
(symbol) @string.special.symbol
[
"&&"
"||"
"&"
"|"
"^"
"=="
"!="
"<"
"<="
">"
">="
"<<"
">>"
"+"
"-"
"*"
"/"
"%"
"="
"|@|"
"@@"
"@|@"
] @operator
[
"arg"
"classvar"
"const"
"var"
] @keyword
[
"("
")"
"["
"]"
"{"
"}"
"|"
] @punctuation.bracket
[
";"
"."
","
] @punctuation.delimiter
(control_structure) @keyword.control.conditional
(escape_sequence) @string.special
(duplicated_statement) @keyword.control.repeat