chiark / gitweb /
el/dot-emacs.el (mdw-fontify-rust): Fix integer literal syntax.
[profile] / dot / ipython-config.py
CommitLineData
27be52b3
MW
1### -*-python -*-
2
449d37ba
MW
3try: import pygments as PYG
4except: PYG = None
5try: import prompt_toolkit as PTK
6except: PTK = None
9ddf986b 7
27be52b3
MW
8c = get_config()
9
60abf0c5 10## Simple stuff.
27be52b3
MW
11c.InteractiveShell.autocall = 0
12c.InteractiveShell.autoindent = True
13c.InteractiveShell.automagic = False
14
15c.InteractiveShell.color_info = True
16c.InteractiveShell.colors = 'Linux'
17
27be52b3 18c.TerminalIPythonApp.display_banner = False
27be52b3 19c.TerminalInteractiveShell.confirm_exit = False
d4d07085 20c.TerminalInteractiveShell.display_completions = 'readlinelike'
60abf0c5
MW
21
22## Syntax colouring.
449d37ba
MW
23if PYG and getattr(PYG, 'token', None):
24 T = PYG.token
25 c.TerminalInteractiveShell.highlighting_style = 'emacs'
26 c.TerminalInteractiveShell.highlighting_style_overrides = {
27 T.Keyword: 'bold #fff',
28 T.Comment: 'italic #54ff9f',
29 T.Literal.Number: '#ffff00',
30 T.Literal.String: '#87ceff',
31 T.Literal.String.Escape: '#87ceff',
32 T.Literal.String.Interpol: '#87ceff',
33 T.Name: '#fff',
34 T.Name.Builtin: '#fff',
35 T.Name.Class: '#fff',
36 T.Name.Constant: 'italic #fff',
37 T.Name.Decorator: '#fff',
38 T.Name.Exception: '#fff',
39 T.Name.Function: '#fff',
40 T.Name.Function.Magic: '#fff',
41 T.Name.Label: '#fff',
42 T.Name.Namespace: '#fff',
43 T.Name.Variable: '#fff',
44 T.Name.Variable.Class: '#fff',
45 T.Name.Variable.Global: '#fff',
46 T.Name.Variable.Instance: '#fff',
47 T.Name.Variable.Magic: '#fff',
48 T.Operator: '#eec591',
49 T.Operator.Word: 'bold #fff',
50 T.Punctuation: '#eec591',
51 }
52
53if PYG and PTK:
54 d = {
55 PTK.token.Token.MatchingBracket: '',
56 PTK.token.Token.MatchingBracket.Cursor: '',
57 PTK.token.Token.MatchingBracket.Other: 'bg:#006400'
58 }
59 c.TerminalInteractiveShell.highlighting_style_overrides.update(d)