# Define SciTE settings for Rust

file.patterns.rust=*.rs
filter.rust=Rust (rs)|$(file.patterns.rust)|
lexer.$(file.patterns.rust)=rust

word.chars.rust=$(chars.alpha)$(chars.numeric)_#
word.characters.$(file.patterns.rust)=$(word.chars.rust)
calltip.rust.word.characters=$(chars.alpha)$(chars.numeric)_

comment.block.at.line.start.rust=1
comment.block.rust=//~
comment.stream.start.rust=/*
comment.stream.end.rust=*/
comment.box.start.rust=/*
comment.box.middle.rust= *
comment.box.end.rust= */

statement.indent.$(file.patterns.rust)=6
statement.end.$(file.patterns.rust)=16 ;
statement.lookback.$(file.patterns.rust)=20
block.start.$(file.patterns.rust)=16 {
block.end.$(file.patterns.rust)=16 }
braces.rust.style=16

# Rust keywords
keywords.$(file.patterns.rust)=fn type as break const copy do else enum extern fail for if impl let log loop match mod mut priv pub ref return static struct trait unsafe use while in continue alignof be offsetof pure sizeof typeof yield

# Built-in types
keywords2.$(file.patterns.rust)=bool int uint i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str Self

# The self parameter
keywords3.$(file.patterns.rust)=self

# Styles

style.rust.32=$(font.base)
# Whitespace
style.rust.0=fore:#808080
# Block comment
style.rust.1=$(colour.code.comment.box),$(font.code.comment.box)
# Line comment
style.rust.2=$(colour.code.comment.line),$(font.code.comment.line)
# Block doc comment
style.rust.3=$(colour.code.comment.doc),$(font.code.comment.doc)
# Line doc comment
style.rust.4=$(colour.code.comment.doc),$(font.code.comment.doc)
# Number
style.rust.5=$(colour.number)
# Keywords 1-7
style.rust.6=$(colour.keyword),bold
style.rust.7=$(colour.keyword),bold
style.rust.8=$(colour.keyword)
style.rust.9=$(colour.keyword),bold
style.rust.10=$(colour.keyword),bold
style.rust.11=$(colour.keyword),bold
style.rust.12=$(colour.keyword),bold
# Regular string
style.rust.13=$(colour.string)
# Raw string
style.rust.14=fore:#B090B0
# Character
style.rust.15=$(colour.char)
# Operator
style.rust.16=$(colour.operator),bold
# Identifier
style.rust.17=
# Lifetime
style.rust.18=fore:#007F7F
# Macro
style.rust.19=$(colour.preproc)
# Lexical error
style.rust.20=fore:#000000,$(font.monospace),back:#E0C0E0

command.compile.*.rs=rustc $(FileNameExt)
command.build.*.rs=$(make.command)
command.go.*.rs=./$(FileName)

