Files
zyedidia.micro/runtime/syntax/rust.micro
CaptainMcClellan c29e58e3d4 Syntax Highlight Overhaul (#568)
* Adds new syntax groups and docs
* Large refactor of syntax highlighting files

* Changed keybindings for changing tabs.

* Improved the documentation.

* Added F3 for find to default bindings.

* Massive overhaul of the syntax files

* Phase 1 color-scheme updates.

* The new colorschemes.

* Colorscheme and syntax updates.

* Tiny fix to the cmc theme.

* Another phase of colorschemes and testing gitconfig.

* Fixed haskell error

* Fortran fix

* Delete test.txt

Heh, sorry about forgetting to do this again.
2017-03-01 09:30:35 -05:00

40 lines
1.1 KiB
Plaintext

# Nano configuration for Rust
# Copyright 2015 The Rust Project Developers.
#
# NOTE: Rules are applied in order: later rules re-colorize matching text.
syntax "rust" "\.rs"
# function definition
color identifier.class "fn [a-z0-9_]+"
# Reserved words
color statement "\b(abstract|alignof|as|become|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b"
# macros
color identifier.macro "[a-z_]+!"
# Constants
color constant "[A-Z][A-Z_]+"
# Numbers
color constant.number "\b[0-9]+\b"
# Traits/Enums/Structs/Types/etc.
color type "[A-Z][a-z]+"
# Strings
color constant.string "\".*\""
color constant.string start="\".*\\$" end=".*\""
# NOTE: This isn't accurate but matching "#{0,} for the end of the string is too liberal
color special start="r#+\"" end="\"#+"
# Comments
color comment "//.*"
color comment start="/\*" end="\*/"
# Attributes
color special start="#!\[" end="\]"
# Some common markers
color todo "(XXX|TODO|FIXME|\?\?\?)"