Variable: go-ts-mode--font-lock-settings
go-ts-mode--font-lock-settings is a variable defined in
go-ts-mode.el.gz.
Value
((#<treesit-compiled-query> t bracket nil)
(#<treesit-compiled-query> t comment nil)
(#<treesit-compiled-query> t constant nil)
(#<treesit-compiled-query> t delimiter nil)
(#<treesit-compiled-query> t definition nil)
(#<treesit-compiled-query> t function nil)
(#<treesit-compiled-query> t keyword nil)
(#<treesit-compiled-query> t label nil)
(#<treesit-compiled-query> t number nil)
(#<treesit-compiled-query> t string nil)
(#<treesit-compiled-query> t type nil)
(#<treesit-compiled-query> t property nil)
(#<treesit-compiled-query> t variable nil)
(#<treesit-compiled-query> t escape-sequence t)
(#<treesit-compiled-query> t error t))
Documentation
Tree-sitter font-lock settings for go-ts-mode.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/go-ts-mode.el.gz
(defvar go-ts-mode--font-lock-settings
(treesit-font-lock-rules
:language 'go
:feature 'bracket
'((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
:language 'go
:feature 'comment
'((comment) @font-lock-comment-face)
:language 'go
:feature 'constant
`([(false) (nil) (true)] @font-lock-constant-face
,@(when (go-ts-mode--iota-query-supported-p)
'((iota) @font-lock-constant-face))
(const_declaration
(const_spec name: (identifier) @font-lock-constant-face)))
:language 'go
:feature 'delimiter
'((["," "." ";" ":"]) @font-lock-delimiter-face)
:language 'go
:feature 'definition
`((function_declaration
name: (identifier) @font-lock-function-name-face)
(method_declaration
name: (field_identifier) @font-lock-function-name-face)
(,(if (go-ts-mode--method-elem-supported-p)
'method_elem
'method_spec)
name: (field_identifier) @font-lock-function-name-face)
(field_declaration
name: (field_identifier) @font-lock-property-name-face)
(parameter_declaration
name: (identifier) @font-lock-variable-name-face)
(short_var_declaration
left: (expression_list
(identifier) @font-lock-variable-name-face
("," (identifier) @font-lock-variable-name-face)*))
(var_spec name: (identifier) @font-lock-variable-name-face
("," name: (identifier) @font-lock-variable-name-face)*))
:language 'go
:feature 'function
'((call_expression
function: (identifier) @font-lock-function-call-face)
(call_expression
function: (selector_expression
field: (field_identifier) @font-lock-function-call-face)))
:language 'go
:feature 'keyword
`([,@go-ts-mode--keywords] @font-lock-keyword-face)
:language 'go
:feature 'label
'((label_name) @font-lock-constant-face)
:language 'go
:feature 'number
'([(float_literal)
(imaginary_literal)
(int_literal)] @font-lock-number-face)
:language 'go
:feature 'string
'([(interpreted_string_literal)
(raw_string_literal)
(rune_literal)] @font-lock-string-face)
:language 'go
:feature 'type
'([(package_identifier) (type_identifier)] @font-lock-type-face)
:language 'go
:feature 'property
'((selector_expression field: (field_identifier) @font-lock-property-use-face)
(keyed_element (_ (identifier) @font-lock-property-use-face)))
:language 'go
:feature 'variable
'((identifier) @font-lock-variable-use-face)
:language 'go
:feature 'escape-sequence
:override t
'((escape_sequence) @font-lock-escape-face)
:language 'go
:feature 'error
:override t
'((ERROR) @font-lock-warning-face))
"Tree-sitter font-lock settings for `go-ts-mode'.")