1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-05-18 15:16:05 +02:00

feat: Update `tree-sitter-sql` and migrate `highlights.scm` to match grammar (#5772)

* Sort buildin functions alphabetically

* fix: Query float type like other numeric types

* Update tree-sitter-sql and update highlights.scm to match grammar
This commit is contained in:
LeoniePhiline 2023-02-02 23:44:36 +01:00 committed by GitHub
parent 10fee815c4
commit 30412366be
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 14 deletions

View File

@ -1434,7 +1434,7 @@ injection-regex = "sql"
[[grammar]] [[grammar]]
name = "sql" name = "sql"
source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "4fe05b2d81565ddb689d2f415e07afdacc515c52" } source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "286e10c5bc5d1703ee8f9afb351165a9a6182be1" }
[[language]] [[language]]
name = "gdscript" name = "gdscript"

View File

@ -1,19 +1,20 @@
(keyword_gist) @function.builtin
(keyword_btree) @function.builtin
(keyword_btree) @function.builtin (keyword_btree) @function.builtin
(keyword_hash) @function.builtin (keyword_hash) @function.builtin
(keyword_gist) @function.builtin
(keyword_spgist) @function.builtin (keyword_spgist) @function.builtin
(keyword_gin) @function.builtin (keyword_gin) @function.builtin
(keyword_brin) @function.builtin (keyword_brin) @function.builtin
(keyword_float) @function.builtin
(invocation (cast
name: (identifier) @function.builtin name: (identifier) @function.builtin)
parameter: [(field)]? @variable.other.member)
(count (count
name: (identifier) @function.builtin name: (identifier) @function.builtin)
parameter: [(field)]? @variable.other.member)
(keyword_group_concat) @function.builtin
(invocation
name: (identifier) @function.builtin)
(table_reference (table_reference
name: (identifier) @namespace) name: (identifier) @namespace)
@ -28,7 +29,6 @@
table_alias: (identifier) @variable.parameter table_alias: (identifier) @variable.parameter
name: (identifier) @variable.other.member) name: (identifier) @variable.other.member)
(comment) @comment (comment) @comment
[ [
@ -102,12 +102,16 @@
(keyword_as) (keyword_as)
(keyword_distinct) (keyword_distinct)
(keyword_constraint) (keyword_constraint)
; (keyword_cast)
; (keyword_count) ; (keyword_count)
; (keyword_group_concat)
(keyword_separator)
(keyword_max) (keyword_max)
(keyword_min) (keyword_min)
(keyword_avg) (keyword_avg)
(keyword_end) (keyword_end)
(keyword_force) (keyword_force)
(keyword_ignore)
(keyword_using) (keyword_using)
(keyword_use) (keyword_use)
(keyword_index) (keyword_index)
@ -117,8 +121,6 @@
(keyword_auto_increment) (keyword_auto_increment)
(keyword_default) (keyword_default)
(keyword_cascade) (keyword_cascade)
(keyword_between)
(keyword_window)
(keyword_with) (keyword_with)
(keyword_no) (keyword_no)
(keyword_data) (keyword_data)
@ -129,6 +131,7 @@
(keyword_owner) (keyword_owner)
(keyword_temp) (keyword_temp)
(keyword_temporary) (keyword_temporary)
(keyword_unlogged)
(keyword_union) (keyword_union)
(keyword_all) (keyword_all)
(keyword_except) (keyword_except)
@ -138,8 +141,35 @@
(keyword_commit) (keyword_commit)
(keyword_rollback) (keyword_rollback)
(keyword_transaction) (keyword_transaction)
(keyword_group_concat) (keyword_over)
(keyword_separator) (keyword_nulls)
(keyword_first)
(keyword_last)
(keyword_window)
(keyword_range)
(keyword_rows)
(keyword_groups)
(keyword_between)
(keyword_unbounded)
(keyword_preceding)
(keyword_following)
(keyword_exclude)
(keyword_current)
(keyword_row)
(keyword_ties)
(keyword_others)
(keyword_only)
(keyword_unique)
(keyword_concurrently)
; (keyword_btree)
; (keyword_hash)
; (keyword_gist)
; (keyword_spgist)
; (keyword_gin)
; (keyword_brin)
(keyword_like)
(keyword_similar)
(keyword_preserve)
] @keyword ] @keyword
[ [
@ -159,6 +189,7 @@
[ [
(keyword_boolean) (keyword_boolean)
(keyword_smallserial) (keyword_smallserial)
(keyword_serial) (keyword_serial)
(keyword_bigserial) (keyword_bigserial)
@ -170,6 +201,7 @@
(numeric) (numeric)
(keyword_real) (keyword_real)
(double) (double)
(float)
(keyword_money) (keyword_money)
@ -194,4 +226,15 @@
(keyword_geography) (keyword_geography)
(keyword_box2d) (keyword_box2d)
(keyword_box3d) (keyword_box3d)
(char)
(varchar)
(numeric)
(keyword_oid)
(keyword_name)
(keyword_regclass)
(keyword_regnamespace)
(keyword_regproc)
(keyword_regtype)
] @type.builtin ] @type.builtin