Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asottile/pygments-pre-commit
A pygments lexer for pre-commit output.
https://github.com/asottile/pygments-pre-commit
Last synced: 11 days ago
JSON representation
A pygments lexer for pre-commit output.
- Host: GitHub
- URL: https://github.com/asottile/pygments-pre-commit
- Owner: asottile
- License: mit
- Created: 2018-12-29T21:37:21.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T00:31:04.000Z (22 days ago)
- Last Synced: 2024-10-24T12:26:52.108Z (20 days ago)
- Language: Python
- Size: 267 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![build status](https://github.com/asottile/pygments-pre-commit/actions/workflows/main.yml/badge.svg)](https://github.com/asottile/pygments-pre-commit/actions/workflows/main.yml)
[![Build Status](https://github.com/asottile/pygments-pre-commit/actions/workflows/deploy.yml/badge.svg)](https://github.com/asottile/pygments-pre-commit/actions)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/asottile/pygments-pre-commit/main.svg)](https://results.pre-commit.ci/latest/github/asottile/pygments-pre-commit/main)pygments-pre-commit
===================A pygments lexer for pre-commit output
See [some demos](https://asottile.github.io/pygments-pre-commit)!
Or [see it in action on pre-commit.com](https://pre-commit.com/#usage).## Installation
```bash
pip install pygments-pre-commit
```## Usage
This library provides a pygments lexer called `pre-commit`.
```rst
.. code-block:: pre-commit$ pre-commit run
passing..................................................................Passed
failing..................................................................Failed
- hook id: failing
- exit code: 1['.pre-commit-config.yaml', 'a']
skipped (no files)...................................(no files to check)Skipped
skip me.................................................................Skipped
```This library also provides a sphinx extension. It can be enabled by adding
`'pygments_pre_commit'` to the `extensions` setting in your `conf.py`.The colors can be tweaked using the sphinx setting (in `conf.py`)
`pygments_pre_commit_ansi_colors`:```python
pygments_pre_commit_ansi_colors = {
'Black': '#2e3436',
'Cyan': '#06989a',
'Green': '#4e9a06',
'Red': '#c00',
'Yellow': '#c4A000',
'Faint': '#ccc',
}
```