lilypond.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. """
  2. pygments.styles.lilypond
  3. ~~~~~~~~~~~~~~~~~~~~~~~~
  4. LilyPond-specific style.
  5. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
  6. :license: BSD, see LICENSE for details.
  7. """
  8. from pygments.style import Style
  9. from pygments.token import Token
  10. __all__ = ['LilyPondStyle']
  11. class LilyPondStyle(Style):
  12. """
  13. Style for the LilyPond language.
  14. .. versionadded:: 2.11
  15. """
  16. name = 'lilypond'
  17. # Don't show it in the gallery, it's intended for LilyPond
  18. # input only and doesn't show good output on Python code.
  19. web_style_gallery_exclude = True
  20. styles = {
  21. Token.Text: "",
  22. Token.Keyword: "bold",
  23. Token.Comment: "italic #A3AAB2",
  24. Token.String: "#AB0909",
  25. Token.String.Escape: "#C46C6C",
  26. Token.String.Symbol: "noinherit",
  27. Token.Pitch: "", #"#911520",
  28. Token.Number: "#976806", # includes durations
  29. # A bare 11 is not distinguishable from a number, so we highlight
  30. # the same.
  31. Token.ChordModifier: "#976806",
  32. Token.Name.Lvalue: "#08547A",
  33. Token.Name.BackslashReference: "#08547A",
  34. Token.Name.Builtin.MusicCommand: "bold #08547A",
  35. Token.Name.Builtin.PaperVariable: "bold #6C5A05",
  36. Token.Name.Builtin.HeaderVariable: "bold #6C5A05",
  37. Token.Name.Builtin.MusicFunction: "bold #08547A",
  38. Token.Name.Builtin.Clef: "bold #08547A",
  39. Token.Name.Builtin.Scale: "bold #08547A",
  40. Token.Name.Builtin.RepeatType: "#08547A",
  41. Token.Name.Builtin.Dynamic: "#68175A",
  42. Token.Name.Builtin.Articulation: "#68175A",
  43. Token.Name.Builtin.SchemeFunction: "bold #A83401",
  44. Token.Name.Builtin.SchemeBuiltin: "bold",
  45. Token.Name.Builtin.MarkupCommand: "bold #831E71",
  46. Token.Name.Builtin.Context: "bold #038B8B",
  47. Token.Name.Builtin.ContextProperty: "#038B8B",
  48. Token.Name.Builtin.Grob: "bold #0C7441",
  49. Token.Name.Builtin.GrobProperty: "#0C7441",
  50. Token.Name.Builtin.Translator: "bold #6200A4",
  51. }