Variable: zig-ts--font-lock-settings
zig-ts--font-lock-settings is a variable defined in zig-ts-mode.el.
Value
((#<treesit-compiled-query> t bracket nil nil zig)
(#<treesit-compiled-query> t builtin nil nil zig)
(#<treesit-compiled-query> t comment nil nil zig)
(#<treesit-compiled-query> t delimiter nil nil zig)
(#<treesit-compiled-query> t definition nil nil zig)
(#<treesit-compiled-query> t assignment nil nil zig)
(#<treesit-compiled-query> t function nil nil zig)
(#<treesit-compiled-query> t keyword nil nil zig)
(#<treesit-compiled-query> t number nil nil zig)
(#<treesit-compiled-query> t operator nil nil zig)
(#<treesit-compiled-query> t string nil nil zig)
(#<treesit-compiled-query> t type nil nil zig)
(#<treesit-compiled-query> t label nil nil zig)
(#<treesit-compiled-query> t property nil nil zig)
(#<treesit-compiled-query> t constant nil nil zig)
(#<treesit-compiled-query> t variable nil nil zig)
(#<treesit-compiled-query> t escape-sequence t nil zig)
(#<treesit-compiled-query> t error t nil zig))
Documentation
treesit-font-lock-settings for zig-ts-mode.
Source Code
;; Defined in /nix/store/jxyx97fhclw4jb395hn97pz60n2rh0hs-emacs-packages-deps/share/emacs/site-lisp/elpa/zig-ts-mode-20260921.1554/zig-ts-mode.el
(defvar zig-ts--font-lock-settings
(treesit-font-lock-rules
:language 'zig
:feature 'bracket
'((["[" "]" "(" ")" "{" "}"]) @font-lock-bracket-face
(payload "|" @font-lock-bracket-face))
:language 'zig
:feature 'builtin
'(([(builtin_identifier) "c" "..."]) @font-lock-builtin-face
(calling_convention "(" _ @font-lock-builtin-face ")")
(((identifier) @font-lock-builtin-face)
(:equal "_" @font-lock-builtin-face)))
:language 'zig
:feature 'comment
'((((comment) @font-lock-doc-face)
(:match "^//\\(?:!\\|/\\(?:[^/]\\|$\\)\\)" @font-lock-doc-face))
(comment) @font-lock-comment-face)
:language 'zig
:feature 'delimiter
'(([";" "." "," ":" "=>" "->"]) @font-lock-delimiter-face)
:language 'zig
:feature 'definition
'((function_declaration name: (identifier) @font-lock-function-name-face)
(struct_declaration (container_field
name: (identifier) @font-lock-property-name-face))
(enum_declaration (container_field
name: (identifier) @font-lock-property-name-face))
(union_declaration (container_field
name: (identifier) @font-lock-property-name-face))
(variable_declaration (identifier) @font-lock-type-face
"=" [(struct_declaration)
(enum_declaration)
(union_declaration)
(opaque_declaration)])
(variable_declaration [("var" (identifier) @font-lock-variable-name-face)
("const" (identifier) @font-lock-constant-face)]
"=" (identifier) @font-lock-variable-use-face)
(variable_declaration
:anchor [("const" (identifier) @font-lock-constant-face)
("var" (identifier) @font-lock-variable-name-face)]))
:language 'zig
:feature 'assignment
'((initializer_list
(assignment_expression
left: (field_expression
"."
member: (identifier) @font-lock-property-name-face)))
(variable_declaration (field_expression
"."
member: (identifier) @font-lock-property-use-face)))
:language 'zig
:feature 'function
'((call_expression function: (identifier) @font-lock-function-call-face)
(call_expression
function: (field_expression
member: (identifier) @font-lock-function-call-face)))
:language 'zig
:feature 'keyword
`(([,@zig-ts--keywords]) @font-lock-keyword-face)
:language 'zig
:feature 'number
'(([(integer) (float)]) @font-lock-number-face)
:language 'zig
:feature 'operator
`(([,@zig-ts--operators]) @font-lock-operator-face)
:language 'zig
:feature 'string
'(([(character) (string) (multiline_string)]) @font-lock-string-face)
:language 'zig
:feature 'type
'((parameter type: (identifier) @font-lock-type-face)
(enum_declaration (container_field
type: (identifier) @font-lock-type-face))
((identifier) @font-lock-type-face
(:match "^[A-Z_][a-zA-Z0-9_]*" @font-lock-type-face))
(([(builtin_type) "anyframe"]) @font-lock-type-face))
:language 'zig
:feature 'label
'((block_label (identifier) @font-lock-constant-face)
(break_label (identifier) @font-lock-constant-face))
:language 'zig
:feature 'property
'((field_expression "." member: (identifier) @font-lock-property-use-face)
(call_expression
function: (field_expression
object: (field_expression
member: (identifier) @font-lock-property-use-face))))
;; Must be under type, otherwise can be highlighted as constants
:language 'zig
:feature 'constant
'(([(boolean) "null" "unreachable" "undefined"]) @font-lock-constant-face
((identifier) @font-lock-constant-face
(:match "^[A-Z][A-Z_0-9]+$" @font-lock-constant-face)))
:language 'zig
:feature 'variable
'((field_initializer "." (identifier) @font-lock-variable-use-face)
(identifier) @font-lock-variable-use-face)
:language 'zig
:feature 'escape-sequence
:override t
'((escape_sequence) @font-lock-escape-face)
:language 'zig
:feature 'error
:override t
'((ERROR) @font-lock-warning-face))
"`treesit-font-lock-settings' for `zig-ts-mode'.")