rose-pine.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Ref: https://github.com/vadimdemedes/thememirror/blob/94a6475a9113ec03d880fcb817aadcc5a16e82e4/source/themes/rose-pine-dawn.ts
  2. import { tags as t } from '@lezer/highlight';
  3. import { createTheme } from '@uiw/codemirror-themes';
  4. // Author: Rosé Pine
  5. export const rosePine = createTheme({
  6. theme: 'light',
  7. settings: {
  8. background: '#faf4ed',
  9. foreground: '#575279',
  10. caret: '#575279',
  11. selection: '#6e6a8614',
  12. gutterBackground: '#faf4ed',
  13. gutterForeground: '#57527970',
  14. lineHighlight: '#6e6a860d',
  15. },
  16. styles: [
  17. {
  18. tag: t.comment,
  19. color: '#9893a5',
  20. },
  21. {
  22. tag: [t.bool, t.null],
  23. color: '#286983',
  24. },
  25. {
  26. tag: t.number,
  27. color: '#d7827e',
  28. },
  29. {
  30. tag: t.className,
  31. color: '#d7827e',
  32. },
  33. {
  34. tag: [t.angleBracket, t.tagName, t.typeName],
  35. color: '#56949f',
  36. },
  37. {
  38. tag: t.attributeName,
  39. color: '#907aa9',
  40. },
  41. {
  42. tag: t.punctuation,
  43. color: '#797593',
  44. },
  45. {
  46. tag: [t.keyword, t.modifier],
  47. color: '#286983',
  48. },
  49. {
  50. tag: [t.string, t.regexp],
  51. color: '#ea9d34',
  52. },
  53. {
  54. tag: t.variableName,
  55. color: '#d7827e',
  56. },
  57. ],
  58. });