Support using styles from Pygments plugins (#663)

`pygments.styles.STYLE_MAP` contains only styles built directly into
Pygments library. To list all available styles (including styles
registered by plugins), one should use `get_all_styles` generator.

For respective Pygments documentation, see:
http://pygments.org/docs/styles/#getting-a-list-of-available-styles
This commit is contained in:
Piotr Śliwka 2018-04-14 22:25:59 +02:00 committed by Jakub Roztočil
parent 8ca333dda0
commit 87e661c5f1

View File

@ -16,7 +16,7 @@ from httpie.compat import is_windows
from httpie.plugins import FormatterPlugin
AVAILABLE_STYLES = set(pygments.styles.STYLE_MAP.keys())
AVAILABLE_STYLES = set(pygments.styles.get_all_styles())
AVAILABLE_STYLES.add('solarized')
# This is the native style provided by the terminal emulator color scheme