1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-29 01:24:52 +03:00

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<T>` or `HashMap<K, V>`. 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.
This commit is contained in:
Tim Allen 2018-06-23 17:55:02 +10:00
parent 2a4d3eb13b
commit 53f0ce8247

View File

@ -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
# ‾‾‾‾‾‾‾‾