defaults.py 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. """
  2. The default styling.
  3. """
  4. from __future__ import unicode_literals
  5. from prompt_toolkit.token import Token
  6. __all__ = (
  7. 'DEFAULT_STYLE_EXTENSIONS',
  8. 'default_style_extensions',
  9. )
  10. #: Styling of prompt-toolkit specific tokens, that are not know by the default
  11. #: Pygments style.
  12. DEFAULT_STYLE_EXTENSIONS = {
  13. # Highlighting of search matches in document.
  14. Token.SearchMatch: 'noinherit reverse',
  15. Token.SearchMatch.Current: 'noinherit #ffffff bg:#448844 underline',
  16. # Highlighting of select text in document.
  17. Token.SelectedText: 'reverse',
  18. Token.CursorColumn: 'bg:#dddddd',
  19. Token.CursorLine: 'underline',
  20. Token.ColorColumn: 'bg:#ccaacc',
  21. # Highlighting of matching brackets.
  22. Token.MatchingBracket: '',
  23. Token.MatchingBracket.Other: '#000000 bg:#aacccc',
  24. Token.MatchingBracket.Cursor: '#ff8888 bg:#880000',
  25. Token.MultipleCursors.Cursor: '#000000 bg:#ccccaa',
  26. # Line numbers.
  27. Token.LineNumber: '#888888',
  28. Token.LineNumber.Current: 'bold',
  29. Token.Tilde: '#8888ff',
  30. # Default prompt.
  31. Token.Prompt: '',
  32. Token.Prompt.Arg: 'noinherit',
  33. Token.Prompt.Search: 'noinherit',
  34. Token.Prompt.Search.Text: '',
  35. # Search toolbar.
  36. Token.Toolbar.Search: 'bold',
  37. Token.Toolbar.Search.Text: 'nobold',
  38. # System toolbar
  39. Token.Toolbar.System: 'bold',
  40. Token.Toolbar.System.Text: 'nobold',
  41. # "arg" toolbar.
  42. Token.Toolbar.Arg: 'bold',
  43. Token.Toolbar.Arg.Text: 'nobold',
  44. # Validation toolbar.
  45. Token.Toolbar.Validation: 'bg:#550000 #ffffff',
  46. Token.WindowTooSmall: 'bg:#550000 #ffffff',
  47. # Completions toolbar.
  48. Token.Toolbar.Completions: 'bg:#bbbbbb #000000',
  49. Token.Toolbar.Completions.Arrow: 'bg:#bbbbbb #000000 bold',
  50. Token.Toolbar.Completions.Completion: 'bg:#bbbbbb #000000',
  51. Token.Toolbar.Completions.Completion.Current: 'bg:#444444 #ffffff',
  52. # Completions menu.
  53. Token.Menu.Completions: 'bg:#bbbbbb #000000',
  54. Token.Menu.Completions.Completion: '',
  55. Token.Menu.Completions.Completion.Current: 'bg:#888888 #ffffff',
  56. Token.Menu.Completions.Meta: 'bg:#999999 #000000',
  57. Token.Menu.Completions.Meta.Current: 'bg:#aaaaaa #000000',
  58. Token.Menu.Completions.MultiColumnMeta: 'bg:#aaaaaa #000000',
  59. # Scrollbars.
  60. Token.Scrollbar: 'bg:#888888',
  61. Token.Scrollbar.Button: 'bg:#444444',
  62. Token.Scrollbar.Arrow: 'bg:#222222 #888888 bold',
  63. # Auto suggestion text.
  64. Token.AutoSuggestion: '#666666',
  65. # Trailing whitespace and tabs.
  66. Token.TrailingWhiteSpace: '#999999',
  67. Token.Tab: '#999999',
  68. # When Control-C has been pressed. Grayed.
  69. Token.Aborted: '#888888',
  70. # Entering a Vi digraph.
  71. Token.Digraph: '#4444ff',
  72. }
  73. default_style_extensions = DEFAULT_STYLE_EXTENSIONS # Old name.