mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 04:50:03 -04:00
fixed some errors
This commit is contained in:
parent
9b5e82ff9d
commit
83bfcde7c2
5 changed files with 15 additions and 11 deletions
|
|
@ -10,6 +10,7 @@
|
|||
(test_expression)
|
||||
(struct_expression)
|
||||
(anonymous_struct_enum)
|
||||
(anonymous_array_expr)
|
||||
(union_expression)
|
||||
(enum_expression)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
; Types
|
||||
|
||||
; Zig
|
||||
|
||||
|
|
@ -13,23 +12,23 @@
|
|||
|
||||
; function definition
|
||||
(function_signature
|
||||
(identifier) @function
|
||||
)
|
||||
name: (identifier) @function)
|
||||
|
||||
(function_declaration (identifier) @function)
|
||||
(function_declaration
|
||||
name: (identifier) @function)
|
||||
|
||||
; Function calls
|
||||
; (call_expression
|
||||
; function: (identifier)) @function
|
||||
(call_expression
|
||||
function: (identifier) @function)
|
||||
|
||||
(build_in_call_expr
|
||||
function: (identifier) @function.builtin
|
||||
function: (identifier) @function
|
||||
)
|
||||
|
||||
;; other identifiers
|
||||
(type_identifier) @type
|
||||
(primitive_type) @type.builtin
|
||||
(field_identifier) @property
|
||||
(field_identifier) @field
|
||||
|
||||
(line_comment) @comment
|
||||
(doc_comment) @comment
|
||||
|
|
@ -38,14 +37,14 @@
|
|||
(integer_literal) @number
|
||||
(float_literal) @number
|
||||
|
||||
(boolean_literal) @constant.builtin
|
||||
(boolean_literal) @boolean
|
||||
(undefined_literal) @constant.builtin
|
||||
(null_literal) @constant.builtin
|
||||
|
||||
(ERROR) @error
|
||||
; (ERROR) @error
|
||||
|
||||
(string_literal) @string
|
||||
(multiline_string_literal "\\\\" @string.special)
|
||||
(multiline_string_literal) @string
|
||||
|
||||
(escape_sequence) @constant.builtin
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
(struct_expression)
|
||||
(struct_construction)
|
||||
(anonymous_struct_enum)
|
||||
(anonymous_array_expr)
|
||||
(enum_expression)
|
||||
(union_expression)
|
||||
] @indent
|
||||
|
|
|
|||
1
queries/zig/injections.scm
Normal file
1
queries/zig/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(line_comment) @comment
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
(function_declaration
|
||||
name: (identifier) @definition.function
|
||||
)
|
||||
|
|
@ -22,4 +23,5 @@
|
|||
(while_expression)
|
||||
(for_expression)
|
||||
(test_expression)
|
||||
(anonymous_array_expr)
|
||||
] @scope
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue