Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rose-pine/pygments
Soho vibes for Pygments
https://github.com/rose-pine/pygments
ipython pygments pygments-style radian rose-pine
Last synced: 24 days ago
JSON representation
Soho vibes for Pygments
- Host: GitHub
- URL: https://github.com/rose-pine/pygments
- Owner: rose-pine
- License: isc
- Created: 2022-12-06T19:03:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T15:29:45.000Z (3 months ago)
- Last Synced: 2024-09-29T18:23:51.895Z (about 1 month ago)
- Topics: ipython, pygments, pygments-style, radian, rose-pine
- Language: Python
- Homepage:
- Size: 2.36 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Rose Piné for Pygments
All natural pine, faux fur and a bit of soho vibes for the classy minimalist
[![Python versions](https://img.shields.io/badge/python-%3E=3.9-blue?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/downloads/)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/rose-pine/pygments/test.yml?style=for-the-badge&logo=GitHub&label=test)
![Codecov](https://img.shields.io/codecov/c/github/drearondov/pygments-rose-pine?style=for-the-badge&logo=codecov&logoColor=white)
[![License](https://img.shields.io/badge/license-ISC-purple?style=for-the-badge)](https://github.com/drearondov/pygments-rose-pine/blob/main/LICENSE)
[![Latest release](https://img.shields.io/github/v/release/drearondov/pygments-rose-pine?style=for-the-badge)](https://github.com/drearondov/pygments-rose-pine/releases/latest)
[![Any color you like](https://img.shields.io/badge/code%20style-black-black?style=for-the-badge)](https://github.com/psf/black)## Requirements
This package has been tested on Python versions 3.9, 3.10, 3.11 with Python 3.9
being the minimum required.## Installation
The `pygments-rose-pine` package is not currently published to [PyPI](https://pypi.org/).
If, however, you still wish to install this package, the following steps
_should_ work to install the [latest release](https://github.com/drearondov/pygments-rose-pine/releases/latest).```bash
repo="https://github.com/rose-pine/pygments"# Find the latest release.
latest=$(git ls-remote --tags --refs $repo | # Fetch remote tags.
sort -t '/' -k 3 -V | # Sort them by version.
tail -n 1 | # Take the latest one.
awk -F / '{print $3}') # Return only the tag.# Craft the URL for the release asset.
version=$(echo $latest | tr -d 'v') # Remove the leading v.
wheel="pygments_rose_pine-${version}-py3-none-any.whl"
release="${repo}/releases/download/${latest}/${wheel}"# Install the release.
pip install $release
```You can also use [Pipx](https://github.com/pypa/pipx) to install it, but bear in
mind that you need to inject the package in the `venv` of the tool you want to
use it with. So the script will be:```bash
repo="https://github.com/rose-pine/pygments"# Find the latest release.
latest=$(git ls-remote --tags --refs $repo | # Fetch remote tags.
sort -t '/' -k 3 -V | # Sort them by version.
tail -n 1 | # Take the latest one.
awk -F / '{print $3}') # Return only the tag.# Craft the URL for the release asset.
version=$(echo $latest | tr -d 'v') # Remove the leading v.
wheel="pygments_rose_pine-${version}-py3-none-any.whl"
release="${repo}/releases/download/${latest}/${wheel}"# Install the release.
pipx inject {name of the tool} $release
```## Usage
The style installs itself as a [Pygments plugin](https://pygments.org/docs/plugins/#entrypoints),
so after installation you should only need to launch your console with one
of the `rose-pine` styles available (`rose-pine`, `rose-pine-moon`, `rose-pine-dawn`).
Below there are some examples for common consoles.### IPython
In the case of IPython, you can launch the console with the following command.
```bash
ipython --TerminalInteractiveShell.highlighting_style=rose-pine
```or add it to your [IPython config](https://ipython.readthedocs.io/en/stable/config/intro.html).
```python
config = get_config()
config.TerminalInteractiveShell.highlighting_style = "rose-pine"
```> _Note:_ This will only affect your syntax highlighting. If you're looking to
> modify your prompt, Reilly Siemmens from the
> [IPython Gruvbox theme](https://github.com/reillysiemens/ipython-style-gruvbox)
> has an excellent [example prompt](https://github.com/reillysiemens/dotfiles/blob/8994f69f23271aa93d83e81032542f17b38423fd/.ipython/profile_default/ipython_config.py)
> that shows how to customize it.### Radian
In the case of Radian, you can add the theme to your
[Radian](https://github.com/randy3k/radian) configuration on your `.radian_profile````python
options(radian.color_scheme = "rose-pine")
```> _Note:_ For radian, the prompt modification options can be found on their [documentation](https://github.com/randy3k/radian).
## Gallery
_Rose Piné_
![Rosé Pine](docs/static/rose-pine.png)
_Rose Piné Moon_
![Rosé Pine Moon](docs/static/rose-pine-moon.png)
_Rose Piné Dawn_
![Rosé Pine Dawn](docs/static/rose-pine-dawn.png)