X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/1344a0a48cc99ea4d44942c500cfa15d3e020505..66969266eeadcde70d9e5dbb1a73c67d2350cf3a:/dot/ipython-config.py?ds=sidebyside diff --git a/dot/ipython-config.py b/dot/ipython-config.py index f57feec..3377a2b 100644 --- a/dot/ipython-config.py +++ b/dot/ipython-config.py @@ -1,7 +1,9 @@ ### -*-python -*- +import pygments as PYG c = get_config() +## Simple stuff. c.InteractiveShell.autocall = 0 c.InteractiveShell.autoindent = True c.InteractiveShell.automagic = False @@ -9,8 +11,35 @@ c.InteractiveShell.automagic = False c.InteractiveShell.color_info = True c.InteractiveShell.colors = 'Linux' -c.Completer.greedy = True - c.TerminalIPythonApp.display_banner = False -c.InteractiveShellApp.ignore_old_config=True c.TerminalInteractiveShell.confirm_exit = False +c.TerminalInteractiveShell.display_completions = 'readlinelike' + +## Syntax colouring. +T = PYG.token +c.TerminalInteractiveShell.highlighting_style = 'emacs' +c.TerminalInteractiveShell.highlighting_style_overrides = { + T.Keyword: 'bold #fff', + T.Comment: 'italic #54ff9f', + T.Literal.Number: '#adff2f', + T.Literal.String: '#87ceff', + T.Literal.String.Escape: '#87ceff', + T.Literal.String.Interpol: '#87ceff', + T.Name: '#fff', + T.Name.Builtin: '#fff', + T.Name.Class: '#fff', + T.Name.Constant: 'italic #fff', + T.Name.Decorator: '#fff', + T.Name.Function: '#fff', + T.Name.Function.Magic: '#fff', + T.Name.Label: '#fff', + T.Name.Namespace: '#fff', + T.Name.Variable: '#fff', + T.Name.Variable.Class: '#fff', + T.Name.Variable.Global: '#fff', + T.Name.Variable.Instance: '#fff', + T.Name.Variable.Magic: '#fff', + T.Operator: '#eec591', + T.Operator.Word: 'bold #fff', + T.Punctuation: '#eec591' +}