From 8043959265366ed0c945b7f868337a3f9823a747 Mon Sep 17 00:00:00 2001 From: Alexandr Date: Wed, 22 Feb 2023 15:25:15 +0200 Subject: [PATCH 1/3] Doc string fix in selection.rs (#6077) * Doc string fix Delete duplicate `the` * selection.rs doc string wording * Remove extra whitespace at end of doc text --------- Co-authored-by: Ivan Tham --- helix-core/src/selection.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs index 7817618f..0ac2c680 100644 --- a/helix-core/src/selection.rs +++ b/helix-core/src/selection.rs @@ -21,14 +21,14 @@ use std::borrow::Cow; /// can be in any order, or even share the same position. /// /// The anchor and head positions use gap indexing, meaning -/// that their indices represent the the gaps *between* `char`s +/// that their indices represent the gaps *between* `char`s /// rather than the `char`s themselves. For example, 1 /// represents the position between the first and second `char`. /// -/// Below are some example `Range` configurations to better -/// illustrate. The anchor and head indices are show as -/// "(anchor, head)", followed by example text with "[" and "]" -/// inserted to represent the anchor and head positions: +/// Below are some examples of `Range` configurations. +/// The anchor and head indices are shown as "(anchor, head)" +/// tuples, followed by example text with "[" and "]" symbols +/// representing the anchor and head positions: /// /// - (0, 3): `[Som]e text`. /// - (3, 0): `]Som[e text`. From 6494fc1daf2bb379e6a1f4ec94f3dafd99b3fb34 Mon Sep 17 00:00:00 2001 From: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com> Date: Thu, 23 Feb 2023 01:04:33 +0100 Subject: [PATCH 2/3] feat(sql): MariaDB/MySQL syntax, Apache Hive syntax, unified builtin functions, floats, negative integers (#6041) * feat(sql): MariaDB/MySQL table options `COLLATE`, `CHARACTER SET`, `ENGINE` Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/286e10c5bc5d1703ee8f9afb351165a9a6182be1...30e15d45dceb24ea51acf81ee7d75d81567b6e02 * feat(sql): Optional `COLUMN` in `ALTER TABLE` Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/30e15d45dceb24ea51acf81ee7d75d81567b6e02...c508e6044adf4298d7b321f966c90cbe32d75d23 * feat(sql): Add `UNSIGNED` support, refactor numeric types Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/c508e6044adf4298d7b321f966c90cbe32d75d23...2d1d5b68a1e11796dd0f4f068fc3e9d7e59fe9f7 * feat(sql): Add support for Apache Spark create Hive table Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/2d1d5b68a1e11796dd0f4f068fc3e9d7e59fe9f7...7be06f4d5eabace883dd45959c13dc740f1f1b98 * feat(sql): Add support for signed and unsigned floating point literals Upstream changes: https://github.com/DerekStride/tree-sitter-sql/pull/92/files * feat(sql): Add interval data type Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/13d375dea377bae5f235176fae97a50ba584db54...7b4bcd0394d759a660f470a4f07aa08b7b130d8c * feat(sql): Add support for DROP INDEX Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/7b4bcd0394d759a660f470a4f07aa08b7b130d8c...173d6feb5064defb7d0ef742a4fc7c6d763a2df0 * feat(sql): Add MariaDB/MySQL `ALTER TABLE ... CHANGE|MODIFY ... [FIRST|AFTER]` syntax Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/173d6feb5064defb7d0ef742a4fc7c6d763a2df0...0d7a121b2a08fb37109f7be1cc6654443cad661f * feat(sql): Extract fields from Apache Hive storage location and row format Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/0d7a121b2a08fb37109f7be1cc6654443cad661f...d2f0f6695fffa4ec1c81fc2060eddf83161f9ee3 * feat(sql): Fix unified built-in functions Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/d2f0f6695fffa4ec1c81fc2060eddf83161f9ee3...e4e43ba742a2ee88cbb24dbf305a7daadd583873 * feat(sql): Support negative integers Upstream changes: https://github.com/DerekStride/tree-sitter-sql/compare/e4e43ba742a2ee88cbb24dbf305a7daadd583873...3a3f92b29c880488a08bc2baaf1aca6432ec3380 * rework(sql): Improve `@constant.numeric` regex --- languages.toml | 2 +- runtime/queries/sql/highlights.scm | 75 +++++++++++++++++++++++------- 2 files changed, 58 insertions(+), 19 deletions(-) diff --git a/languages.toml b/languages.toml index 1caef6b2..d8888c21 100644 --- a/languages.toml +++ b/languages.toml @@ -1434,7 +1434,7 @@ injection-regex = "sql" [[grammar]] name = "sql" -source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "286e10c5bc5d1703ee8f9afb351165a9a6182be1" } +source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "3a3f92b29c880488a08bc2baaf1aca6432ec3380" } [[language]] name = "gdscript" diff --git a/runtime/queries/sql/highlights.scm b/runtime/queries/sql/highlights.scm index a2d2f7fe..f15a92e7 100644 --- a/runtime/queries/sql/highlights.scm +++ b/runtime/queries/sql/highlights.scm @@ -1,20 +1,17 @@ -(keyword_btree) @function.builtin -(keyword_hash) @function.builtin -(keyword_gist) @function.builtin -(keyword_spgist) @function.builtin -(keyword_gin) @function.builtin -(keyword_brin) @function.builtin - -(cast - name: (identifier) @function.builtin) - -(count - name: (identifier) @function.builtin) -(keyword_group_concat) @function.builtin +[ + (keyword_btree) + (keyword_hash) + (keyword_gist) + (keyword_spgist) + (keyword_gin) + (keyword_brin) -(invocation - name: (identifier) @function.builtin) + (cast) + (count) + (group_concat) + (invocation) +] @function.builtin (table_reference name: (identifier) @namespace) @@ -57,7 +54,7 @@ ] @constant.builtin ((literal) @constant.numeric - (#match? @constant.numeric "^(-?\d*\.?\d*)$")) + (#match? @constant.numeric "^-?\\d*\\.?\\d*$")) (literal) @string @@ -92,6 +89,8 @@ (keyword_primary) (keyword_create) (keyword_alter) + (keyword_change) + (keyword_modify) (keyword_drop) (keyword_add) (keyword_table) @@ -119,8 +118,12 @@ (keyword_if) (keyword_exists) (keyword_auto_increment) + (keyword_collate) + (keyword_character) + (keyword_engine) (keyword_default) (keyword_cascade) + (keyword_restrict) (keyword_with) (keyword_no) (keyword_data) @@ -144,6 +147,7 @@ (keyword_over) (keyword_nulls) (keyword_first) + (keyword_after) (keyword_last) (keyword_window) (keyword_range) @@ -170,6 +174,37 @@ (keyword_like) (keyword_similar) (keyword_preserve) + (keyword_unsigned) + (keyword_zerofill) + + (keyword_external) + (keyword_stored) + (keyword_cached) + (keyword_uncached) + (keyword_replication) + (keyword_tblproperties) + (keyword_compute) + (keyword_stats) + (keyword_location) + (keyword_partitioned) + (keyword_comment) + (keyword_sort) + (keyword_format) + (keyword_delimited) + (keyword_fields) + (keyword_terminated) + (keyword_escaped) + (keyword_lines) + + (keyword_parquet) + (keyword_rcfile) + (keyword_csv) + (keyword_textfile) + (keyword_avro) + (keyword_sequencefile) + (keyword_orc) + (keyword_avro) + (keyword_jsonfile) ] @keyword [ @@ -193,9 +228,11 @@ (keyword_smallserial) (keyword_serial) (keyword_bigserial) - (keyword_smallint) - (keyword_int) + (tinyint) + (smallint) + (mediumint) + (int) (bigint) (decimal) (numeric) @@ -222,6 +259,8 @@ (keyword_timestamp) (keyword_timestamptz) + (keyword_interval) + (keyword_geometry) (keyword_geography) (keyword_box2d) From 621ab0e57f051790a663dd4a32c841bb96bdd527 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Thu, 23 Feb 2023 23:27:24 -0500 Subject: [PATCH 3/3] update tree-sitter-git-rebase hash (#6094) --- languages.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.toml b/languages.toml index d8888c21..aade6bf2 100644 --- a/languages.toml +++ b/languages.toml @@ -1120,7 +1120,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "git-rebase" -source = { git = "https://github.com/the-mikedavis/tree-sitter-git-rebase", rev = "332dc528f27044bc4427024dbb33e6941fc131f2" } +source = { git = "https://github.com/the-mikedavis/tree-sitter-git-rebase", rev = "d8a4207ebbc47bd78bacdf48f883db58283f9fd8" } [[language]] name = "regex"