all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#62112: [PATCH] Add missing rust-ts-mode highlight query for scoped_type_identifiers
@ 2023-03-11  2:23 Randy Taylor
  2023-03-11 13:56 ` Dmitry Gutov
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Taylor @ 2023-03-11  2:23 UTC (permalink / raw)
  To: 62112; +Cc: dgutov


[-- Attachment #1.1: Type: text/plain, Size: 610 bytes --]

X-Debbugs-CC: dgutov@yandex.ru

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.

[-- Attachment #1.2: Type: text/html, Size: 3175 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-missing-rust-ts-mode-highlight-query-for-scoped_.patch --]
[-- Type: text/x-patch; name=0001-Add-missing-rust-ts-mode-highlight-query-for-scoped_.patch, Size: 1008 bytes --]

From bbdd3ada3d577a3b90c94b399f98a4c66b0ea7f3 Mon Sep 17 00:00:00 2001
From: Randy Taylor <dev@rjt.dev>
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#62112: [PATCH] Add missing rust-ts-mode highlight query for scoped_type_identifiers
  2023-03-11  2:23 bug#62112: [PATCH] Add missing rust-ts-mode highlight query for scoped_type_identifiers Randy Taylor
@ 2023-03-11 13:56 ` Dmitry Gutov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Gutov @ 2023-03-11 13:56 UTC (permalink / raw)
  To: Randy Taylor, 62112-done

Version: 29.1

On 11/03/2023 04:23, Randy Taylor wrote:
> X-Debbugs-CC: dgutov@yandex.ru
> 
> 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.

Thanks! Installed.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-11 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-11  2:23 bug#62112: [PATCH] Add missing rust-ts-mode highlight query for scoped_type_identifiers Randy Taylor
2023-03-11 13:56 ` Dmitry Gutov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.