From cdc16445a4b7fa03a419a53c8a850ecefa3756db Mon Sep 17 00:00:00 2001 From: backwardspy Date: Thu, 17 Nov 2022 21:00:59 +0000 Subject: [PATCH] docs: add pygments usage information --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index b7c3c2a..2a9bfb1 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,38 @@ mantle: #292c3c crust: #232634 ``` +## Pygments Styles + +This package provides a Pygments style for each of the four Catppuccin flavours. + +Install Catppuccin with the `pygments` feature to include the relevant dependencies: + +```bash +pip install catppuccin[pygments] +``` + +The styles are registered as importlib entrypoints, which allows Pygments to +find them by name: + +```python +>>> from pygments.styles import get_style_by_name +>>> get_style_by_name("catppuccin-frappe") +catppuccin.extras.pygments.FrappeStyle +``` + +The following style names are available: + + - `catppuccin-latte` + - `catppuccin-frappe` + - `catppuccin-macchiato` + - `catppuccin-mocha` + +They can also be accessed by directly importing them: + +```python +from catppuccin.extras.pygments import MacchiatoStyle +``` + ## Contribution If you are looking to contribute, please read through our