ayu.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Ref: https://github.com/vadimdemedes/thememirror/blob/94a6475a9113ec03d880fcb817aadcc5a16e82e4/source/themes/ayu-light.ts
  2. import { tags as t } from '@lezer/highlight';
  3. import { createTheme } from '@uiw/codemirror-themes';
  4. // Author: Konstantin Pschera
  5. export const ayu = createTheme({
  6. theme: 'light',
  7. settings: {
  8. background: '#fcfcfc',
  9. foreground: '#5c6166',
  10. caret: '#ffaa33',
  11. selection: '#036dd626',
  12. gutterBackground: '#fcfcfc',
  13. gutterForeground: '#8a919966',
  14. lineHighlight: '#8a91991a',
  15. },
  16. styles: [
  17. {
  18. tag: t.comment,
  19. color: '#787b8099',
  20. },
  21. {
  22. tag: t.string,
  23. color: '#86b300',
  24. },
  25. {
  26. tag: t.regexp,
  27. color: '#4cbf99',
  28. },
  29. {
  30. tag: [t.number, t.bool, t.null],
  31. color: '#ffaa33',
  32. },
  33. {
  34. tag: t.variableName,
  35. color: '#5c6166',
  36. },
  37. {
  38. tag: [t.definitionKeyword, t.modifier],
  39. color: '#fa8d3e',
  40. },
  41. {
  42. tag: [t.keyword, t.special(t.brace)],
  43. color: '#fa8d3e',
  44. },
  45. {
  46. tag: t.operator,
  47. color: '#ed9366',
  48. },
  49. {
  50. tag: t.separator,
  51. color: '#5c6166b3',
  52. },
  53. {
  54. tag: t.punctuation,
  55. color: '#5c6166',
  56. },
  57. {
  58. tag: [t.definition(t.propertyName), t.function(t.variableName)],
  59. color: '#f2ae49',
  60. },
  61. {
  62. tag: [t.className, t.definition(t.typeName)],
  63. color: '#22a4e6',
  64. },
  65. {
  66. tag: [t.tagName, t.typeName, t.self, t.labelName],
  67. color: '#55b4d4',
  68. },
  69. {
  70. tag: t.angleBracket,
  71. color: '#55b4d480',
  72. },
  73. {
  74. tag: t.attributeName,
  75. color: '#f2ae49',
  76. },
  77. ],
  78. });