Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RustEnhanced.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ contexts:
1: support.macro.rust
2: meta.group.rust punctuation.definition.group.begin.rust
push:
- meta_content_scope: meta.group.rust
- meta_scope: meta.group.rust
- include: comments
- match: ','
set:
Expand All @@ -182,6 +182,7 @@ contexts:
- include: format-raw-string
- match: '(?=\S)'
set: group-tail
- include: group-tail

- match: '\b[[:lower:]_][[:lower:][:digit:]_]*!(?=\s*(\(|\{|\[))'
scope: support.macro.rust
Expand Down
22 changes: 22 additions & 0 deletions syntax_test_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,28 @@ impl fmt::Display for PrintableStruct {
// ^^^^ string.quoted.double
// ^^ constant.other.placeholder
// ^ punctuation.definition.group.end
write!(get_writer(), "{}", "{}")
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function
// ^^^^^^ support.macro
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group
// ^^^^^^^^^^ support.function
// ^^^^ string.quoted.double
// ^^ constant.other.placeholder
// ^^^^ string.quoted.double
// ^ punctuation.definition.group.begin
// ^ punctuation.definition.group.end
writeln!(w)
// ^^^^^^^^^^^^^^^^ meta.function
// ^^^^^^^^ support.macro
// ^^^ meta.group
// ^ punctuation.definition.group.begin
// ^ punctuation.definition.group.end
println!()
// ^^^^^^^^^^^^^^^ meta.function
// ^^^^^^^^ support.macro
// ^^ meta.group
// ^ punctuation.definition.group.begin
// ^ punctuation.definition.group.end
}
// ^^ meta.function meta.block
// ^ punctuation.definition.block.end
Expand Down