mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 20:10:10 -04:00
Import highlights.scm from tree-sitter-zig
This commit is contained in:
parent
c7313ffd10
commit
4821bde80a
1 changed files with 19 additions and 10 deletions
|
|
@ -1,6 +1,10 @@
|
|||
;; Assume all-caps names are constants
|
||||
; Types
|
||||
|
||||
; (identifier) @variable
|
||||
; Zig
|
||||
|
||||
; Variables
|
||||
; --------------
|
||||
(identifier) @variable
|
||||
|
||||
(parameter (identifier) @variable)
|
||||
|
||||
|
|
@ -15,11 +19,12 @@
|
|||
(function_declaration (identifier) @function)
|
||||
|
||||
; Function calls
|
||||
(call_expression
|
||||
function: (identifier) @function)
|
||||
; (call_expression
|
||||
; function: (identifier)) @function
|
||||
|
||||
(build_in_call_expr
|
||||
function: (identifier) @attribute)
|
||||
function: (identifier) @function.builtin
|
||||
)
|
||||
|
||||
;; other identifiers
|
||||
(type_identifier) @type
|
||||
|
|
@ -37,12 +42,18 @@
|
|||
(undefined_literal) @constant.builtin
|
||||
(null_literal) @constant.builtin
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
(string_literal) @string
|
||||
(multiline_string_literal) @string
|
||||
(multiline_string_literal "\\\\" @string.special)
|
||||
|
||||
(escape_sequence) @constant.builtin
|
||||
|
||||
(label_identifier) @label
|
||||
|
||||
(call_modifier) @keyword ; async
|
||||
|
||||
(binary_operator) @keyword.operator
|
||||
|
||||
[
|
||||
"align"
|
||||
|
|
@ -51,7 +62,6 @@
|
|||
; "anyframe"
|
||||
; "anytype"
|
||||
;"asm"
|
||||
; "async"
|
||||
"await"
|
||||
"break"
|
||||
; "callconv"
|
||||
|
|
@ -67,7 +77,6 @@
|
|||
"export"
|
||||
"extern"
|
||||
"false"
|
||||
; "fn"
|
||||
"for"
|
||||
"if"
|
||||
"inline"
|
||||
|
|
@ -116,6 +125,7 @@
|
|||
(assignment_modifier) @attribute
|
||||
|
||||
[
|
||||
".{"
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
|
|
@ -148,7 +158,7 @@
|
|||
;"<"
|
||||
;"<<"
|
||||
"<<="
|
||||
;"<="
|
||||
; "<="
|
||||
"-"
|
||||
"-="
|
||||
"-%"
|
||||
|
|
@ -164,7 +174,6 @@
|
|||
"+="
|
||||
;"+%"
|
||||
"+%="
|
||||
"c\""
|
||||
"?"
|
||||
;">"
|
||||
;">>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue