According to the Rust language reference[1], a raw string starts with an 'r',
zero or more '#' characters, and a '"', and doesn't close until a '"' is
immediately followed by the matching number of '#' characters.
[1]: https://doc.rust-lang.org/reference/tokens.html#raw-string-literals
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.
Changes:
- Highlight float literals with float type suffixes (nf64 and nf32)
- Make module items use the module color
- Highlight macro variables $variable
- Highlight lifetimes
- Highlight u128 and i128
- Highlight character literals (e.g. 'a')
- Highlight dyn keyword (will in the future be used for trait objects)
As well as ordinary `//` line-comments, Rust regards `///` comments
as documentation applying to the following item, and `//!` comments as
documentation applying to the enclosing item, so we should copy those
to new lines, too.
That means we can now have highlighters active at global, buffer, and
window scope. The add-highlighter and remove-highlighter syntax changed
to take the parent path (scope/group/...) as a mandatory argument,
superseeding the previous -group switch.
this uses the string opening regex from the c-family highlighter to prevent
highlighting the rest of the file as a string on encountering the character
literal '"'
The option is now used as a fallback when detection by extension fails. Some
scripts like `base/mail.kak` and `base/html.kak` still rely heavily on it.