feat!: drop modules, general refactor and cleanup

This commit is contained in:
Christian Clason 2023-06-12 09:54:30 -06:00
parent c13e28f894
commit 2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions

View file

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

View 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

View 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

View file

@ -0,0 +1,5 @@
([
(line_comment)
(block_comment)
] @injection.content
(#set! injection.language "comment"))

View 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