mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
egui_extras: syntax-highlighting of .toml (#3388)
This commit is contained in:
@@ -508,6 +508,7 @@ impl Language {
|
|||||||
"c" | "h" | "hpp" | "cpp" | "c++" => Some(Self::cpp()),
|
"c" | "h" | "hpp" | "cpp" | "c++" => Some(Self::cpp()),
|
||||||
"py" | "python" => Some(Self::python()),
|
"py" | "python" => Some(Self::python()),
|
||||||
"rs" | "rust" => Some(Self::rust()),
|
"rs" | "rust" => Some(Self::rust()),
|
||||||
|
"toml" => Some(Self::toml()),
|
||||||
_ => {
|
_ => {
|
||||||
None // unsupported language
|
None // unsupported language
|
||||||
}
|
}
|
||||||
@@ -655,4 +656,12 @@ impl Language {
|
|||||||
.collect(),
|
.collect(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn toml() -> Self {
|
||||||
|
Self {
|
||||||
|
double_slash_comments: false,
|
||||||
|
hash_comments: true,
|
||||||
|
keywords: Default::default(),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user