emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 6093d38 327/486: Add syntax coloring for type-in


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 6093d38 327/486: Add syntax coloring for type-inferred constants and variables
Date: Sat, 7 Aug 2021 09:25:45 -0400 (EDT)

branch: elpa/rust-mode
commit 6093d382fee9efc6cc29dd05246185079a0ff045
Author: Per Nordlöw <per.nordlow@gmail.com>
Commit: Aankhen <Aankhen@users.noreply.github.com>

    Add syntax coloring for type-inferred constants and variables
---
 rust-mode.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/rust-mode.el b/rust-mode.el
index 3b2a856..caf83a7 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -681,6 +681,12 @@ match data if found. Returns nil if not within a Rust 
string."
      ;; Field names like `foo:`, highlight excluding the :
      (,(concat (rust-re-grab rust-re-ident) ":[^:]") 1 
font-lock-variable-name-face)
 
+     ;; Type-inferred constant
+     (,(concat "\\_<\\(?:let\\|ref\\)\\s-+" (rust-re-grab rust-re-ident) 
"\\_>") 1 font-lock-constant-face)
+
+     ;; Type-inferred variable
+     (,(concat "\\_<\\(?:let\\|ref\\)\\s-+mut\\s-+" (rust-re-grab 
rust-re-ident) "\\_>") 1 font-lock-variable-name-face)
+
      ;; Type names like `Foo::`, highlight excluding the ::
      (,(rust-path-font-lock-matcher rust-re-uc-ident) 1 font-lock-type-face)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]