mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +01:00
pdbrc: add support from THEME_PREFER_LIGHT env variable
This commit is contained in:
parent
b193afe50a
commit
0c52f21233
11
pdbrc.py
11
pdbrc.py
|
@ -1,19 +1,26 @@
|
|||
import os
|
||||
import pdb
|
||||
|
||||
from pygments.styles import get_style_by_name
|
||||
|
||||
if os.getenv("THEME_PREFER_LIGHT"):
|
||||
pygments_style = "gruvbox-light"
|
||||
else:
|
||||
pygments_style = "gruvbox-dark"
|
||||
|
||||
|
||||
class Config(pdb.DefaultConfig):
|
||||
# prompt = "(Pdb++) "
|
||||
skip = ["dvc.stage.decorators.*", "funcy.*"]
|
||||
sticky_by_default = True
|
||||
use_pygments = True
|
||||
if pdb.__version__.version.startswith("0.10.4."):
|
||||
pygments_formatter_class = "pygments.formatters.TerminalTrueColorFormatter"
|
||||
pygments_formatter_kwargs = {"style": get_style_by_name("gruvbox-dark")}
|
||||
pygments_formatter_kwargs = {"style": get_style_by_name(pygments_style)}
|
||||
else:
|
||||
from pygments.formatters import TerminalTrueColorFormatter
|
||||
|
||||
formatter = TerminalTrueColorFormatter(style=get_style_by_name("gruvbox-dark"))
|
||||
formatter = TerminalTrueColorFormatter(style=get_style_by_name(pygments_style))
|
||||
|
||||
editor = "vim"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user