|
7 | 7 | from pygments.token import ( |
8 | 8 | Comment, |
9 | 9 | Error, |
| 10 | + Generic, |
10 | 11 | Keyword, |
11 | 12 | Literal, |
12 | 13 | Name, |
@@ -48,28 +49,53 @@ def _make_styles(flavour: Flavour) -> Dict[_TokenType, str]: |
48 | 49 | Punctuation: f"#{flavour.text.hex}", |
49 | 50 | Operator: f"#{flavour.sky.hex}", |
50 | 51 | Comment: f"#{flavour.overlay0.hex}", |
| 52 | + Generic.Heading: f"#{flavour.blue.hex} bold", |
51 | 53 | } |
52 | 54 |
|
53 | 55 |
|
54 | 56 | class LatteStyle(Style): # pylint: disable=too-few-public-methods |
55 | 57 | """Catppuccin Latte pygments style.""" |
56 | 58 |
|
57 | | - styles = _make_styles(Flavour.latte()) |
| 59 | + _flavour = Flavour.latte() |
| 60 | + |
| 61 | + background_color = f"#{_flavour.base.hex}" |
| 62 | + line_number_background_color = f"#{_flavour.mantle.hex}" |
| 63 | + line_number_color = f"#{_flavour.text.hex}" |
| 64 | + |
| 65 | + styles = _make_styles(_flavour) |
58 | 66 |
|
59 | 67 |
|
60 | 68 | class FrappeStyle(Style): # pylint: disable=too-few-public-methods |
61 | 69 | """Catppuccin Frappé pygments style.""" |
62 | 70 |
|
63 | | - styles = _make_styles(Flavour.frappe()) |
| 71 | + _flavour = Flavour.frappe() |
| 72 | + |
| 73 | + background_color = f"#{_flavour.base.hex}" |
| 74 | + line_number_background_color = f"#{_flavour.mantle.hex}" |
| 75 | + line_number_color = f"#{_flavour.text.hex}" |
| 76 | + |
| 77 | + styles = _make_styles(_flavour) |
64 | 78 |
|
65 | 79 |
|
66 | 80 | class MacchiatoStyle(Style): # pylint: disable=too-few-public-methods |
67 | 81 | """Catppuccin Macchiato pygments style.""" |
68 | 82 |
|
69 | | - styles = _make_styles(Flavour.macchiato()) |
| 83 | + _flavour = Flavour.macchiato() |
| 84 | + |
| 85 | + background_color = f"#{_flavour.base.hex}" |
| 86 | + line_number_background_color = f"#{_flavour.mantle.hex}" |
| 87 | + line_number_color = f"#{_flavour.text.hex}" |
| 88 | + |
| 89 | + styles = _make_styles(_flavour) |
70 | 90 |
|
71 | 91 |
|
72 | 92 | class MochaStyle(Style): # pylint: disable=too-few-public-methods |
73 | 93 | """Catppuccin Mocha pygments style.""" |
74 | 94 |
|
75 | | - styles = _make_styles(Flavour.mocha()) |
| 95 | + _flavour = Flavour.mocha() |
| 96 | + |
| 97 | + background_color = f"#{_flavour.base.hex}" |
| 98 | + line_number_background_color = f"#{_flavour.mantle.hex}" |
| 99 | + line_number_color = f"#{_flavour.text.hex}" |
| 100 | + |
| 101 | + styles = _make_styles(_flavour) |
0 commit comments