mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 20:40:02 -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
18
runtime/queries/wing/folds.scm
Normal file
18
runtime/queries/wing/folds.scm
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[
|
||||
(class_definition)
|
||||
(class_implementation)
|
||||
(resource_definition)
|
||||
(resource_implementation)
|
||||
(interface_definition)
|
||||
(interface_implementation)
|
||||
(for_in_loop)
|
||||
(while_statement)
|
||||
(if_statement)
|
||||
(if_let_statement)
|
||||
(elif_block)
|
||||
(struct_definition)
|
||||
(enum_definition)
|
||||
(try_catch_statement)
|
||||
(method_definition)
|
||||
(inflight_method_definition)
|
||||
] @fold
|
||||
86
runtime/queries/wing/highlights.scm
Normal file
86
runtime/queries/wing/highlights.scm
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
(identifier) @variable
|
||||
(reference_identifier) @variable
|
||||
(member_identifier) @property
|
||||
|
||||
; Classes
|
||||
|
||||
(custom_type) @type
|
||||
(class_field
|
||||
name: (identifier) @field)
|
||||
(class_definition
|
||||
name: (identifier) @type)
|
||||
(method_definition
|
||||
name: (identifier) @method)
|
||||
(inflight_method_definition
|
||||
name: (identifier) @method)
|
||||
|
||||
; Functions
|
||||
|
||||
(keyword_argument_key) @parameter
|
||||
(call
|
||||
caller: (reference
|
||||
(nested_identifier
|
||||
property: (member_identifier) @method.call)))
|
||||
(call
|
||||
caller: (reference
|
||||
(reference_identifier) @method.call))
|
||||
|
||||
; Primitives
|
||||
|
||||
(number) @number
|
||||
(duration) @constant
|
||||
(string) @string
|
||||
(bool) @boolean
|
||||
(builtin_type) @type.builtin
|
||||
(json_container_type) @type.builtin
|
||||
|
||||
; Special
|
||||
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"-"
|
||||
"+"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"<"
|
||||
"<="
|
||||
"="
|
||||
"=="
|
||||
"!"
|
||||
"!="
|
||||
">"
|
||||
">="
|
||||
"&&"
|
||||
"??"
|
||||
"||"
|
||||
] @operator
|
||||
|
||||
[
|
||||
";"
|
||||
"."
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"as"
|
||||
"bring"
|
||||
"class"
|
||||
"else"
|
||||
"for"
|
||||
"if"
|
||||
"in"
|
||||
"init"
|
||||
"let"
|
||||
"new"
|
||||
"return"
|
||||
(inflight_specifier)
|
||||
] @keyword
|
||||
5
runtime/queries/wing/locals.scm
Normal file
5
runtime/queries/wing/locals.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
(block) @scope
|
||||
(variable_definition_statement
|
||||
name: (identifier) @definition)
|
||||
|
||||
; TODO: Missing "@local.reference" usage tuned for each relevant identifier location
|
||||
Loading…
Add table
Add a link
Reference in a new issue