tree-sitter-d2/queries/highlights.scm

48 lines
944 B
Scheme

;-------------------------------------------------------------------------------
(container_key) @constant
(shape_key) @variable
(attr_key) @property
(reserved) @error
; Literals
;-------------------------------------------------------------------------------
(language) @type.qualifier
(container_key (string) @string)
(shape_key (string) @string)
(label) @string.special
(attr_value) @string
(integer) @number
(float) @float
(boolean) @boolean
; Comments
;-------------------------------------------------------------------------------
(line_comment) @comment.line
; Punctiation
;-------------------------------------------------------------------------------
(arrow) @operator
[
(dot)
":"
";"
] @punctuation.delimiter
[
"{"
"}"
"|"
"|`"
"`|"
] @punctuation.bracket
; Special (nvim-treesitter overwrite previous rules)
;-------------------------------------------------------------------------------
(ERROR) @error