Skip to content

Commit

Permalink
egui_extras: syntax-highlighting of .toml (#3388)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored Sep 25, 2023
1 parent 8bf0055 commit e8986b1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/egui_extras/src/syntax_highlighting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ impl Language {
"c" | "h" | "hpp" | "cpp" | "c++" => Some(Self::cpp()),
"py" | "python" => Some(Self::python()),
"rs" | "rust" => Some(Self::rust()),
"toml" => Some(Self::toml()),
_ => {
None // unsupported language
}
Expand Down Expand Up @@ -655,4 +656,12 @@ impl Language {
.collect(),
}
}

fn toml() -> Self {
Self {
double_slash_comments: false,
hash_comments: true,
keywords: Default::default(),
}
}
}

0 comments on commit e8986b1

Please sign in to comment.