Import highlights.scm from tree-sitter-zig

This commit is contained in:
Stephan Seitz 2021-03-30 19:53:03 +02:00 committed by Stephan Seitz
parent c7313ffd10
commit 4821bde80a

View file

@ -1,6 +1,10 @@
;; Assume all-caps names are constants ; Types
; (identifier) @variable ; Zig
; Variables
; --------------
(identifier) @variable
(parameter (identifier) @variable) (parameter (identifier) @variable)
@ -15,11 +19,12 @@
(function_declaration (identifier) @function) (function_declaration (identifier) @function)
; Function calls ; Function calls
(call_expression ; (call_expression
function: (identifier) @function) ; function: (identifier)) @function
(build_in_call_expr (build_in_call_expr
function: (identifier) @attribute) function: (identifier) @function.builtin
)
;; other identifiers ;; other identifiers
(type_identifier) @type (type_identifier) @type
@ -37,12 +42,18 @@
(undefined_literal) @constant.builtin (undefined_literal) @constant.builtin
(null_literal) @constant.builtin (null_literal) @constant.builtin
(ERROR) @error
(string_literal) @string (string_literal) @string
(multiline_string_literal) @string (multiline_string_literal "\\\\" @string.special)
(escape_sequence) @constant.builtin (escape_sequence) @constant.builtin
(label_identifier) @label
(call_modifier) @keyword ; async
(binary_operator) @keyword.operator
[ [
"align" "align"
@ -51,7 +62,6 @@
; "anyframe" ; "anyframe"
; "anytype" ; "anytype"
;"asm" ;"asm"
; "async"
"await" "await"
"break" "break"
; "callconv" ; "callconv"
@ -67,7 +77,6 @@
"export" "export"
"extern" "extern"
"false" "false"
; "fn"
"for" "for"
"if" "if"
"inline" "inline"
@ -116,6 +125,7 @@
(assignment_modifier) @attribute (assignment_modifier) @attribute
[ [
".{"
"(" "("
")" ")"
"[" "["
@ -148,7 +158,7 @@
;"<" ;"<"
;"<<" ;"<<"
"<<=" "<<="
;"<=" ; "<="
"-" "-"
"-=" "-="
"-%" "-%"
@ -164,7 +174,6 @@
"+=" "+="
;"+%" ;"+%"
"+%=" "+%="
"c\""
"?" "?"
;">" ;">"
;">>" ;">>"