Skip to content

Commit cdc1644

Browse files
committed
docs: add pygments usage information
1 parent 9e81cd1 commit cdc1644

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,38 @@ mantle: #292c3c
4747
crust: #232634
4848
```
4949

50+
## Pygments Styles
51+
52+
This package provides a Pygments style for each of the four Catppuccin flavours.
53+
54+
Install Catppuccin with the `pygments` feature to include the relevant dependencies:
55+
56+
```bash
57+
pip install catppuccin[pygments]
58+
```
59+
60+
The styles are registered as importlib entrypoints, which allows Pygments to
61+
find them by name:
62+
63+
```python
64+
>>> from pygments.styles import get_style_by_name
65+
>>> get_style_by_name("catppuccin-frappe")
66+
catppuccin.extras.pygments.FrappeStyle
67+
```
68+
69+
The following style names are available:
70+
71+
- `catppuccin-latte`
72+
- `catppuccin-frappe`
73+
- `catppuccin-macchiato`
74+
- `catppuccin-mocha`
75+
76+
They can also be accessed by directly importing them:
77+
78+
```python
79+
from catppuccin.extras.pygments import MacchiatoStyle
80+
```
81+
5082
## Contribution
5183

5284
If you are looking to contribute, please read through our

0 commit comments

Comments
 (0)