From d13ad0ec562513fd843b1d8007e5b7e70793102d Mon Sep 17 00:00:00 2001 From: Gavin Crawford Date: Wed, 21 Sep 2022 09:37:04 -0600 Subject: [PATCH 1/3] Fix highlighting on certain consts --- runtime/queries/rust/highlights.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 78a7abf01296..7d0afcde5935 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -183,7 +183,7 @@ ; ------- ((identifier) @constant - (#match? @constant "^[A-Z][A-Z\\d_]+$")) + (#match? @constant "^[A-Z][A-Z\\d_]*$")) ; --- ; PascalCase identifiers in call_expressions (e.g. `Ok()`) From 0fb149504a5c2a0a10dcb901b52f96ff7be6fb72 Mon Sep 17 00:00:00 2001 From: gavincrawford <94875769+gavincrawford@users.noreply.github.com> Date: Wed, 21 Sep 2022 09:42:39 -0600 Subject: [PATCH 2/3] Update runtime/queries/rust/highlights.scm Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com> --- runtime/queries/rust/highlights.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 7d0afcde5935..5d14c2c71b16 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -184,6 +184,9 @@ ((identifier) @constant (#match? @constant "^[A-Z][A-Z\\d_]*$")) +(const_item + name: (identifier) @constant +) ; --- ; PascalCase identifiers in call_expressions (e.g. `Ok()`) From 2598ea06fc8f338178eedecb8090c3ad25019cbc Mon Sep 17 00:00:00 2001 From: Gavin Crawford Date: Wed, 21 Sep 2022 13:45:57 -0600 Subject: [PATCH 3/3] Remove faulty highlight stanza --- runtime/queries/rust/highlights.scm | 3 --- 1 file changed, 3 deletions(-) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 5d14c2c71b16..7d0afcde5935 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -184,9 +184,6 @@ ((identifier) @constant (#match? @constant "^[A-Z][A-Z\\d_]*$")) -(const_item - name: (identifier) @constant -) ; --- ; PascalCase identifiers in call_expressions (e.g. `Ok()`)