aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/sql
diff options
context:
space:
mode:
authorLeoniePhiline2023-01-28 20:15:53 +0000
committerGitHub2023-01-28 20:15:53 +0000
commit482cc22fecc109773882d3e0fd6251c33862e89e (patch)
treecc856fd95fa7f5eca62bb3df794c0489eb11cc16 /runtime/queries/sql
parent2c6bf6fca60a21f39939f5ae027ed3f56cf92dbd (diff)
Update tree-sitter-sql and improve highlight queries (#5683)
Diffstat (limited to 'runtime/queries/sql')
-rw-r--r--runtime/queries/sql/highlights.scm28
1 files changed, 11 insertions, 17 deletions
diff --git a/runtime/queries/sql/highlights.scm b/runtime/queries/sql/highlights.scm
index ece8be33..aad5ed31 100644
--- a/runtime/queries/sql/highlights.scm
+++ b/runtime/queries/sql/highlights.scm
@@ -42,21 +42,13 @@
"."
] @punctuation.delimiter
-[
- "*"
- "+"
- "-"
- "/"
- "%"
- "^"
- "||"
- "="
- "<"
- "<="
- "!="
- ">="
- ">"
-] @operator
+(binary_expression
+ operator: _ @operator)
+
+(unary_expression
+ operator: _ @operator)
+
+(all_fields) @special
[
(keyword_null)
@@ -64,11 +56,11 @@
(keyword_false)
] @constant.builtin
-(literal) @string
-
((literal) @constant.numeric
(#match? @constant.numeric "^(-?\d*\.?\d*)$"))
+(literal) @string
+
[
(keyword_select)
(keyword_delete)
@@ -146,6 +138,8 @@
(keyword_commit)
(keyword_rollback)
(keyword_transaction)
+ (keyword_group_concat)
+ (keyword_separator)
] @keyword
[