From 53f0ce824759f0a054be914b08def32fc6878a13 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Sat, 23 Jun 2018 17:55:02 +1000 Subject: [PATCH] rust.kak: lifetimes do not include the following non-word character. A Rust data structure that is generic over a type conventionally uses a single capital letter for the type variable, like `Vec` or `HashMap`. A Rust data structure that is generic over a reference-lifetime conventionally uses an apostrophe followed by a single lower-case letter for the lifetime variable, like `Something<'a>`. Previously, Kakoune would highlight "'a>" as the lifetime parameter; with this change Kakoune highlights "'a" and leaves the closing ">" alone. --- rc/base/rust.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/base/rust.kak b/rc/base/rust.kak index d6a32a29d..d05d11c2b 100644 --- a/rc/base/rust.kak +++ b/rc/base/rust.kak @@ -33,7 +33,7 @@ add-highlighter shared/rust/code regex \b(?:u8|u16|u32|u64|u128|usize|i8|i16|i32 add-highlighter shared/rust/code regex \b(?:mod|crate|use|extern)\b 0:module add-highlighter shared/rust/code regex \$\w+\b 0:variable add-highlighter shared/rust/code regex "'\\\\?.'" 0:value -add-highlighter shared/rust/code regex "'\w+[^']" 0:meta +add-highlighter shared/rust/code regex "('\w+)[^']" 1:meta # Commands # ‾‾‾‾‾‾‾‾