1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 22:00:07 +08:00
SpaceVim/bundle/nvim-treesitter-0.9.1/queries/foam/highlights.scm

62 lines
1.0 KiB
Scheme

;; Comments
(comment) @comment
;; Generic Key-value pairs and dictionary keywords
(key_value
keyword: (identifier) @function
)
(dict
key: (identifier) @type
)
;; Macros
(macro
"$" @conditional
(prev_scope)* @conditional
(identifier)* @namespace
)
;; Directives
"#" @conditional
(preproc_call
directive: (identifier)* @conditional
argument: (identifier)* @namespace
)
((preproc_call
argument: (identifier)* @namespace) @conditional
(#eq? @conditional "ifeq"))
((preproc_call) @conditional
(#any-of? @conditional "else" "endif"))
;; Literals
(number_literal) @float
(string_literal) @string
(escape_sequence) @string.escape
(boolean) @boolean
;; Treat [m^2 s^-2] the same as if it was put in numbers format
(dimensions dimension: (identifier) @float)
;; Punctuation
[
"("
")"
"["
"]"
"{"
"}"
"#{"
"#}"
"|-"
"-|"
"<!--("
")-->"
"$$"
] @punctuation.bracket
";" @punctuation.delimiter
((identifier) @constant.builtin
(#any-of? @constant.builtin "uniform" "non-uniform" "and" "or"))