New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
emacs.py in utils/developer – NEMO

source: utils/developer/emacs.py @ 12489

Last change on this file since 12489 was 11807, checked in by nicolasmartin, 4 years ago

Change colors for CPP directives and modules/routines names for readability

File size: 2.5 KB
Line 
1# -*- coding: utf-8 -*-
2"""
3    pygments.styles.emacs
4    ~~~~~~~~~~~~~~~~~~~~~
5
6    A highlighting style for Pygments, inspired by Emacs.
7
8    :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
9    :license: BSD, see LICENSE for details.
10"""
11
12from pygments.style import Style
13from pygments.token import Keyword, Name, Comment, String, Error, \
14     Number, Operator, Generic, Whitespace
15
16
17class EmacsStyle(Style):
18    """
19    The default style (inspired by Emacs 22).
20    """
21
22    background_color = "#f8f8f8"
23    default_style = ""
24
25    styles = {
26        Whitespace:                "#bbbbbb",
27        Comment:                   "italic #008800",
28        Comment.Preproc:           "noitalic bold #483d8b",   # "dark slate blue"
29        Comment.Special:           "noitalic bold",
30
31        Keyword:                   "#AA22FF",
32        Keyword.Pseudo:            "nobold",
33        Keyword.Type:              "#00BB00",
34
35        Operator:                  "#666666",
36        Operator.Word:             "bold #AA22FF",
37
38        Name.Builtin:              "#AA22FF",
39        Name.Function:             "#0000ff",                 # "Blue1"
40        Name.Class:                "#0000FF",
41        Name.Namespace:            "bold #0000FF",
42        Name.Exception:            "bold #D2413A",
43        Name.Variable:             "#B8860B",
44        Name.Constant:             "#880000",
45        Name.Label:                "#A0A000",
46        Name.Entity:               "bold #999999",
47        Name.Attribute:            "#BB4444",
48        Name.Tag:                  "bold #008000",
49        Name.Decorator:            "#AA22FF",
50
51        String:                    "#BB4444",
52        String.Doc:                "italic",
53        String.Interpol:           "bold #BB6688",
54        String.Escape:             "bold #BB6622",
55        String.Regex:              "#BB6688",
56        String.Symbol:             "#B8860B",
57        String.Other:              "#008000",
58        Number:                    "#666666",
59
60        Generic.Heading:           "bold #000080",
61        Generic.Subheading:        "bold #800080",
62        Generic.Deleted:           "#A00000",
63        Generic.Inserted:          "#00A000",
64        Generic.Error:             "#FF0000",
65        Generic.Emph:              "italic",
66        Generic.Strong:            "bold",
67        Generic.Prompt:            "bold #000080",
68        Generic.Output:            "#888",
69        Generic.Traceback:         "#04D",
70
71        Error:                     "border:#FF0000"
72    }
Note: See TracBrowser for help on using the repository browser.