aboutsummaryrefslogtreecommitdiffstats
path: root/queries/scheme
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/scheme
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/scheme')
-rw-r--r--queries/scheme/folds.scm3
-rw-r--r--queries/scheme/highlights.scm142
-rw-r--r--queries/scheme/injections.scm2
3 files changed, 71 insertions, 76 deletions
diff --git a/queries/scheme/folds.scm b/queries/scheme/folds.scm
index 64a9a08e6..115809a77 100644
--- a/queries/scheme/folds.scm
+++ b/queries/scheme/folds.scm
@@ -1 +1,2 @@
-(program (list) @fold)
+(program
+ (list) @fold)
diff --git a/queries/scheme/highlights.scm b/queries/scheme/highlights.scm
index fdd494d8b..202a6ab16 100644
--- a/queries/scheme/highlights.scm
+++ b/queries/scheme/highlights.scm
@@ -1,108 +1,103 @@
-;; A highlight query can override the highlights queries before it.
-;; So the order is important.
-;; We should highlight general rules, then highlight special forms.
-
+; A highlight query can override the highlights queries before it.
+; So the order is important.
+; We should highlight general rules, then highlight special forms.
(number) @number
+
(character) @character
+
(boolean) @boolean
+
(string) @string
-[(comment)
- (block_comment)] @comment @spell
-;; highlight for datum comment
-;; copied from ../clojure/highlights.scm
-([(comment) (directive)] @comment
- (#set! "priority" 105))
+[
+ (comment)
+ (block_comment)
+] @comment @spell
-(escape_sequence) @string.escape
+; highlight for datum comment
+; copied from ../clojure/highlights.scm
+([
+ (comment)
+ (directive)
+] @comment
+ (#set! "priority" 105))
-["(" ")" "[" "]" "{" "}"] @punctuation.bracket
+(escape_sequence) @string.escape
-;; variables
+[
+ "("
+ ")"
+ "["
+ "]"
+ "{"
+ "}"
+] @punctuation.bracket
+; variables
(symbol) @variable
-((symbol) @variable.builtin
- (#any-of? @variable.builtin "..." "."))
-;; procedure
+((symbol) @variable.builtin
+ (#any-of? @variable.builtin "..." "."))
+; procedure
(list
- .
- (symbol) @function)
-
-;; special forms
+ .
+ (symbol) @function)
+; special forms
(list
- "["
- (symbol)+ @variable
- "]")
+ "["
+ (symbol)+ @variable
+ "]")
(list
- .
- (symbol) @_f
- .
- (list
- (symbol) @variable)
- (#any-of? @_f "lambda" "λ"))
+ .
+ (symbol) @_f
+ .
+ (list
+ (symbol) @variable)
+ (#any-of? @_f "lambda" "λ"))
(list
- .
- (symbol) @_f
- .
- (list
- (list
- (symbol) @variable))
- (#any-of? @_f
- "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax"))
-
-;; operators
+ .
+ (symbol) @_f
+ .
+ (list
+ (list
+ (symbol) @variable))
+ (#any-of? @_f "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax"))
+; operators
((symbol) @operator
- (#any-of? @operator
- "+" "-" "*" "/" "=" "<=" ">=" "<" ">"))
-
-;; keyword
+ (#any-of? @operator "+" "-" "*" "/" "=" "<=" ">=" "<" ">"))
+; keyword
((symbol) @keyword
- (#any-of? @keyword
- "define" "lambda" "λ" "begin" "do" "define-syntax"
- "and" "or"
- "if" "cond" "case" "when" "unless" "else" "=>"
- "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax"
- "set!"
- "syntax-rules" "identifier-syntax"
- "quote" "unquote" "quote-splicing" "quasiquote" "unquote-splicing"
- "delay"
- "assert"
- "library" "export" "import" "rename" "only" "except" "prefix"))
+ (#any-of? @keyword "define" "lambda" "λ" "begin" "do" "define-syntax" "and" "or" "if" "cond" "case" "when" "unless" "else" "=>" "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax" "set!" "syntax-rules" "identifier-syntax" "quote" "unquote" "quote-splicing" "quasiquote" "unquote-splicing" "delay" "assert" "library" "export" "import" "rename" "only" "except" "prefix"))
((symbol) @keyword.conditional
- (#any-of? @keyword.conditional "if" "cond" "case" "when" "unless"))
-
-;; quote
+ (#any-of? @keyword.conditional "if" "cond" "case" "when" "unless"))
+; quote
(quote
- "'"
- (symbol)) @string.special.symbol
+ "'"
+ (symbol)) @string.special.symbol
(list
- .
- (symbol) @_f
- (#eq? @_f "quote")) @string.special.symbol
-
-;; library
+ .
+ (symbol) @_f
+ (#eq? @_f "quote")) @string.special.symbol
+; library
(list
- .
- (symbol) @_lib
- .
- (symbol) @module
-
- (#eq? @_lib "library"))
-
-;; builtin procedures
-;; procedures in R5RS and R6RS but not in R6RS-lib
+ .
+ (symbol) @_lib
+ .
+ (symbol) @module
+ (#eq? @_lib "library"))
+; builtin procedures
+; procedures in R5RS and R6RS but not in R6RS-lib
((symbol) @function.builtin
; format-ignore
(#any-of? @function.builtin
@@ -180,4 +175,3 @@
"write" "display" "newline" "write-char"
; system
"load" "transcript-on" "transcript-off"))
-
diff --git a/queries/scheme/injections.scm b/queries/scheme/injections.scm
index 321c90add..2f0e58eb6 100644
--- a/queries/scheme/injections.scm
+++ b/queries/scheme/injections.scm
@@ -1,2 +1,2 @@
((comment) @injection.content
- (#set! injection.language "comment"))
+ (#set! injection.language "comment"))