eclipse.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Ref: https://github.com/uiwjs/react-codemirror/blob/399d127f59a97a64974a65923d477d585d2abee5/themes/eclipse/src/index.ts
  2. import { tags as t } from '@lezer/highlight';
  3. import { createTheme } from '@uiw/codemirror-themes';
  4. export const eclipse = createTheme({
  5. theme: 'light',
  6. settings: {
  7. background: '#fff',
  8. foreground: '#000',
  9. // Change color
  10. caret: '#000',
  11. selection: '#d7d4f0',
  12. selectionMatch: '#d7d4f0',
  13. gutterBackground: '#f7f7f7',
  14. gutterForeground: '#999',
  15. lineHighlight: '#006fff1c',
  16. gutterBorder: 'transparent',
  17. },
  18. styles: [
  19. { tag: [t.comment], color: '#3F7F5F' },
  20. { tag: [t.documentMeta], color: '#FF1717' },
  21. { tag: t.keyword, color: '#7F0055', fontWeight: 'bold' },
  22. { tag: t.atom, color: '#00f' },
  23. { tag: t.number, color: '#164' },
  24. { tag: t.propertyName, color: '#164' },
  25. { tag: [t.variableName, t.definition(t.variableName)], color: '#0000C0' },
  26. { tag: t.function(t.variableName), color: '#0000C0' },
  27. { tag: t.string, color: '#2A00FF' },
  28. { tag: t.operator, color: 'black' },
  29. { tag: t.tagName, color: '#170' },
  30. { tag: t.attributeName, color: '#00c' },
  31. { tag: t.link, color: '#219' },
  32. ],
  33. });