egui_extras: syntax-highlighting of .toml (#3388)

This commit is contained in:
Emil Ernerfeldt 2023-09-25 17:48:22 +02:00 committed by GitHub
parent 8bf0055bda
commit e8986b1e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -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
}
@ -655,4 +656,12 @@ impl Language {
.collect(),
}
}
fn toml() -> Self {
Self {
double_slash_comments: false,
hash_comments: true,
keywords: Default::default(),
}
}
}