atproto blogging
1//! Built-in code syntax highlighting themes.
2
3/// A built-in code theme definition.
4#[derive(Debug, Clone)]
5pub struct BuiltinCodeTheme {
6 /// Unique identifier matching the syntect theme name.
7 pub id: &'static str,
8 /// Human-readable name.
9 pub name: &'static str,
10 /// Whether this is "dark" or "light".
11 pub variant: &'static str,
12}
13
14/// All built-in code themes available for selection.
15///
16/// These include embedded themes (rose-pine variants) and syntect's default themes.
17pub static BUILTIN_CODE_THEMES: &[BuiltinCodeTheme] = &[
18 // Embedded themes (always available).
19 BuiltinCodeTheme {
20 id: "rose-pine",
21 name: "Rose Pine",
22 variant: "dark",
23 },
24 BuiltinCodeTheme {
25 id: "rose-pine-dawn",
26 name: "Rose Pine Dawn",
27 variant: "light",
28 },
29 // Syntect default themes.
30 BuiltinCodeTheme {
31 id: "base16-ocean.dark",
32 name: "Base16 Ocean",
33 variant: "dark",
34 },
35 BuiltinCodeTheme {
36 id: "base16-eighties.dark",
37 name: "Base16 Eighties",
38 variant: "dark",
39 },
40 BuiltinCodeTheme {
41 id: "base16-mocha.dark",
42 name: "Base16 Mocha",
43 variant: "dark",
44 },
45 BuiltinCodeTheme {
46 id: "base16-ocean.light",
47 name: "Base16 Ocean Light",
48 variant: "light",
49 },
50 BuiltinCodeTheme {
51 id: "InspiredGitHub",
52 name: "Inspired GitHub",
53 variant: "light",
54 },
55 BuiltinCodeTheme {
56 id: "Solarized (dark)",
57 name: "Solarized Dark",
58 variant: "dark",
59 },
60 BuiltinCodeTheme {
61 id: "Solarized (light)",
62 name: "Solarized Light",
63 variant: "light",
64 },
65];