Subject: [PATCH] Add missing rust-ts-mode highlight query for scoped_type_identifiers

From: Randy Taylor <[email-masked]>
Date: Sat, 11 Mar 2023 02:23:29 +0000

X-Debbugs-CC: [email-masked]

Examples:
match &cli.command {
Commands::Run {
a,
b,
c,
d,
} => todo!(), }

Commands should be highlighted as a type.

Likewise for:
match msg {
Message::Quit => {
println!("The Quit variant has no data to destructure.");
}
Message::Move { x, y } => {
println!("Move in the x direction {x} and in the y direction {y}");
}
Message::Write(text) => {
println!("Text message: {text}");
}
Message::ChangeColor(r, g, b) => {
println!("Change the color to red {r}, green {g}, and blue {b}",)
} }

Message::Move should have Message highlighted as a type.

Attached is a patch fixing it.

From bbdd3ada3d577a3b90c94b399f98a4c66b0ea7f3 Mon Sep 17 00:00:00 2001
From: Randy Taylor <[email-masked]>
Date: Fri, 10 Mar 2023 21:12:33 -0500
Subject: [PATCH] Add missing rust-ts-mode highlight query for
 scoped_type_identifiers

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add missing query.
---
 lisp/progmodes/rust-ts-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el
index 696c2633231..5a4f4dc25c0 100644
--- a/lisp/progmodes/rust-ts-mode.el
+++ b/lisp/progmodes/rust-ts-mode.el
@@ -235,6 +235,7 @@ rust-ts-mode--font-lock-settings
        "^\\(u8\\|u16\\|u32\\|u64\\|u128\\|usize\\|i8\\|i16\\|i32\\|i64\\|i128\\|isize\\|char\\|str\\)$"
        @font-lock-type-face))
      ((scoped_identifier path: (identifier) @rust-ts-mode--fontify-scope))
+     ((scoped_type_identifier path: (identifier) @rust-ts-mode--fontify-scope))
      (type_identifier) @font-lock-type-face)
 
    :language 'rust
-- 
2.39.2