mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 05:20:00 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
c13e28f894
commit
2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions
7
runtime/queries/supercollider/folds.scm
Normal file
7
runtime/queries/supercollider/folds.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[
|
||||
(function_call)
|
||||
(code_block)
|
||||
(function_block)
|
||||
(control_structure)
|
||||
] @fold
|
||||
|
||||
97
runtime/queries/supercollider/highlights.scm
Normal file
97
runtime/queries/supercollider/highlights.scm
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
; highlights.scm
|
||||
; See this for full list: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
|
||||
|
||||
; comments
|
||||
(line_comment) @comment
|
||||
(block_comment) @comment
|
||||
|
||||
; Argument definition
|
||||
(argument name: (identifier) @parameter)
|
||||
|
||||
; Variables
|
||||
(local_var name: (identifier) @variable)
|
||||
(environment_var name:(identifier) @variable.builtin)
|
||||
(builtin_var) @constant.builtin
|
||||
|
||||
; (variable) @variable
|
||||
|
||||
; Functions
|
||||
(function_definition
|
||||
name: (variable) @function)
|
||||
|
||||
; For function calls
|
||||
(named_argument
|
||||
name: (identifier) @property)
|
||||
|
||||
; Methods
|
||||
(method_call
|
||||
name: (method_name) @method)
|
||||
|
||||
; Classes
|
||||
(class) @type
|
||||
|
||||
; Literals
|
||||
(number) @number
|
||||
(float) @float
|
||||
|
||||
(string) @string
|
||||
(symbol) @string.special
|
||||
|
||||
; Operators
|
||||
[
|
||||
"&&"
|
||||
"||"
|
||||
"&"
|
||||
"|"
|
||||
"^"
|
||||
"=="
|
||||
"!="
|
||||
"<"
|
||||
"<="
|
||||
">"
|
||||
">="
|
||||
"<<"
|
||||
">>"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"="
|
||||
] @operator
|
||||
|
||||
; Keywords
|
||||
[
|
||||
"arg"
|
||||
"classvar"
|
||||
"const"
|
||||
; "super"
|
||||
; "this"
|
||||
"var"
|
||||
] @keyword
|
||||
|
||||
; Brackets
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"|"
|
||||
] @punctuation.bracket
|
||||
|
||||
; Delimiters
|
||||
[
|
||||
";"
|
||||
"."
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
; control structure
|
||||
(control_structure) @conditional
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
; SinOsc.ar()!2
|
||||
(duplicated_statement) @repeat
|
||||
31
runtime/queries/supercollider/indents.scm
Normal file
31
runtime/queries/supercollider/indents.scm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
[
|
||||
(function_block)
|
||||
(binary_expression)
|
||||
(collection)
|
||||
(indexed_collection)
|
||||
(parameter_call_list)
|
||||
(function_call)
|
||||
(class_def)
|
||||
(classvar)
|
||||
(const)
|
||||
(instance_var)
|
||||
(variable_definition)
|
||||
(variable_definition_sequence (variable_definition))
|
||||
(control_structure)
|
||||
(return_statement)
|
||||
] @indent.begin
|
||||
|
||||
[
|
||||
(parameter_call_list (argument_calls))
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
"["
|
||||
"]"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
(block_comment)
|
||||
(line_comment)
|
||||
] @indent.ignore
|
||||
5
runtime/queries/supercollider/injections.scm
Normal file
5
runtime/queries/supercollider/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
27
runtime/queries/supercollider/locals.scm
Normal file
27
runtime/queries/supercollider/locals.scm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
; Scopes
|
||||
[
|
||||
(function_call)
|
||||
(code_block)
|
||||
(function_block)
|
||||
(control_structure)
|
||||
] @scope
|
||||
|
||||
; Definitions
|
||||
(argument
|
||||
name: (identifier) @definition.parameter
|
||||
(#set! "definition.var.scope" "local")
|
||||
)
|
||||
|
||||
(variable_definition
|
||||
name: (variable (local_var (identifier) @definition.var
|
||||
)))
|
||||
|
||||
(variable_definition
|
||||
name: (variable (environment_var (identifier) @definition.var))
|
||||
(#set! "definition.var.scope" "global"))
|
||||
|
||||
(function_definition name: (variable) @definition.var
|
||||
(#set! "definition.var.scope" "parent")
|
||||
)
|
||||
|
||||
(identifier) @reference
|
||||
Loading…
Add table
Add a link
Reference in a new issue