chore: query formatting

This commit is contained in:
Pham Huy Hoang 2024-01-06 15:05:50 +09:00 committed by Christian Clason
parent 79975d6557
commit 57a8acf0c4
674 changed files with 18466 additions and 12648 deletions

View file

@ -10,9 +10,7 @@
"subninja"
] @keyword.import
[
":"
] @punctuation.delimiter
":" @punctuation.delimiter
[
"="
@ -27,74 +25,76 @@
"}"
] @punctuation.special
;;
;; Names
;; =====
(pool name: (identifier) @type)
(rule name: (identifier) @function)
(let name: (identifier) @constant)
(expansion (identifier) @constant)
(build rule: (identifier) @function)
;
; Names
; =====
(pool
name: (identifier) @type)
;;
;; Paths and Text
;; ==============
(rule
name: (identifier) @function)
(let
name: (identifier) @constant)
(expansion
(identifier) @constant)
(build
rule: (identifier) @function)
;
; Paths and Text
; ==============
(path) @string.special.path
(text) @string
;;
;; Builtins
;; ========
(pool name: (identifier) @type.builtin
(#any-of? @type.builtin "console"))
(build rule: (identifier) @function.builtin
(#any-of? @function.builtin "phony" "dyndep"))
;
; Builtins
; ========
(pool
name: (identifier) @type.builtin
(#any-of? @type.builtin "console"))
;; Top level bindings
;; ------------------
(build
rule: (identifier) @function.builtin
(#any-of? @function.builtin "phony" "dyndep"))
; Top level bindings
; ------------------
(manifest
(let name: ((identifier) @constant.builtin
(#any-of? @constant.builtin "builddir"
"ninja_required_version"))))
(let
name:
((identifier) @constant.builtin
(#any-of? @constant.builtin "builddir" "ninja_required_version"))))
;; Rules bindings
;; -----------------
; Rules bindings
; -----------------
(rule
(body
(let name: (identifier) @constant.builtin
(#not-any-of? @constant.builtin "command"
"depfile"
"deps"
"msvc_deps_prefix"
"description"
"dyndep"
"generator"
"in"
"in_newline"
"out"
"restat"
"rspfile"
"rspfile_content"
"pool"))))
(let
name: (identifier) @constant.builtin
(#not-any-of? @constant.builtin "command" "depfile" "deps" "msvc_deps_prefix" "description" "dyndep" "generator" "in" "in_newline" "out" "restat" "rspfile" "rspfile_content" "pool"))))
;;
;; Expansion
;; ---------
;
; Expansion
; ---------
(expansion
(identifier) @constant.macro
(#any-of? @constant.macro "in" "out"))
(#any-of? @constant.macro "in" "out"))
;;
;; Escape sequences
;; ================
;
; Escape sequences
; ================
(quote) @string.escape
;;
;; Others
;; ======
;
; Others
; ======
[
(split)
(comment)
(split)
(comment)
] @comment
(comment) @spell

View file

@ -3,4 +3,3 @@
(rule)
(build)
] @indent.begin