aboutsummaryrefslogtreecommitdiffstats
path: root/queries/ninja
diff options
context:
space:
mode:
authorPham Huy Hoang <hoangtun0810@gmail.com>2024-01-06 15:05:50 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 (patch)
tree70bf645539882b88e6fa129cefd30986b89bbac3 /queries/ninja
parentci: add query lint job (diff)
downloadnvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.gz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.bz2
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.lz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.xz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.zst
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.zip
chore: query formatting
Diffstat (limited to 'queries/ninja')
-rw-r--r--queries/ninja/highlights.scm110
-rw-r--r--queries/ninja/indents.scm1
2 files changed, 55 insertions, 56 deletions
diff --git a/queries/ninja/highlights.scm b/queries/ninja/highlights.scm
index 5f87ff6b5..d216c3f71 100644
--- a/queries/ninja/highlights.scm
+++ b/queries/ninja/highlights.scm
@@ -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)
+
+(rule
+ name: (identifier) @function)
-;;
-;; Paths and Text
-;; ==============
+(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"))
+
+(build
+ rule: (identifier) @function.builtin
+ (#any-of? @function.builtin "phony" "dyndep"))
-;; Top level bindings
-;; ------------------
+; 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
diff --git a/queries/ninja/indents.scm b/queries/ninja/indents.scm
index 19f20dff5..80344cdfb 100644
--- a/queries/ninja/indents.scm
+++ b/queries/ninja/indents.scm
@@ -3,4 +3,3 @@
(rule)
(build)
] @indent.begin
-