forked from pygments/pygments-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
36 lines (30 loc) · 1.06 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "zoglin_pygments_plugin" # change this to a package name for your plugin
version = "0.0.1"
dependencies = ["pygments"]
readme = "README.md"
# Declare plugin lexers in this table. The key (like `example_lexer` below) are
# not significant. The value has the form `module_name:ClassName`. The lexer
# class will be imported using `from module_name import ClassName`.
# See the attributes declared in example_lexer.py for how to configure the
# language names and file patterns.
[project.entry-points."pygments.lexers"]
zoglin_lexer = "zoglin_pygments_plugin:ZoglinLexer"
# This is a test command. Running it should print:
#
# [ff0000]foo
# [black]<tab><tab>bar # tabs here
#
# - Our custom lexer highlights "foo" as keyword,
# - Our custom style uses red (ff0000) for keywords,
# - Our custom formatter prints colors in brackets,
# - Our custom filter replaces tabs with "<tab>".
#
# Run with
#
# hatch run test
[tool.hatch.envs.default.scripts]
test = "pygmentize -l zoglin test.exmpl"