Skip to content

Commit 7236832

Browse files
Switch theme from Obsidian purple to Tokyo Night (LazyVim default)
Applies tokyonight-night color palette: - Background: #1a1b26 (deep navy-black) - Text: #c0caf5 (soft blue-white) - Accent: #7aa2f7 (blue), #bb9af7 (magenta), #7dcfff (cyan) - Headings use graduated Tokyo Night colors (blue -> cyan -> magenta) - Bold: orange (#ff9e64), Italic: magenta (#bb9af7) - Code: green (#9ece6a), Links: blue (#7aa2f7) - Selection: #283457 (muted blue) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2768768 commit 7236832

3 files changed

Lines changed: 69 additions & 53 deletions

File tree

src/editor/theme.ts

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,25 @@ import { EditorView } from "@codemirror/view";
22
import { HighlightStyle, syntaxHighlighting } from "@codemirror/language";
33
import { tags } from "@lezer/highlight";
44

5-
const obsidianDarkTheme = EditorView.theme(
5+
// Tokyo Night - Night variant
6+
const tokyoNightTheme = EditorView.theme(
67
{
78
"&": {
89
backgroundColor: "var(--bg-primary)",
910
color: "var(--text-primary)",
1011
},
1112
".cm-content": {
12-
caretColor: "var(--accent)",
13+
caretColor: "var(--text-primary)",
1314
},
1415
".cm-cursor, .cm-dropCursor": {
15-
borderLeftColor: "var(--accent)",
16+
borderLeftColor: "var(--text-primary)",
1617
},
1718
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":
1819
{
19-
backgroundColor: "rgba(127, 109, 242, 0.2)",
20+
backgroundColor: "#283457",
2021
},
2122
".cm-activeLine": {
22-
backgroundColor: "rgba(255, 255, 255, 0.03)",
23+
backgroundColor: "rgba(192, 202, 245, 0.03)",
2324
},
2425
".cm-gutters": {
2526
backgroundColor: "var(--bg-primary)",
@@ -34,31 +35,32 @@ const obsidianDarkTheme = EditorView.theme(
3435
{ dark: true }
3536
);
3637

37-
const obsidianHighlight = HighlightStyle.define([
38-
{ tag: tags.heading1, fontWeight: "700", fontSize: "2em" },
39-
{ tag: tags.heading2, fontWeight: "700", fontSize: "1.6em" },
40-
{ tag: tags.heading3, fontWeight: "600", fontSize: "1.3em" },
41-
{ tag: tags.heading4, fontWeight: "600", fontSize: "1.1em" },
42-
{ tag: tags.heading5, fontWeight: "600" },
38+
const tokyoNightHighlight = HighlightStyle.define([
39+
{ tag: tags.heading1, fontWeight: "700", fontSize: "2em", color: "#7aa2f7" },
40+
{ tag: tags.heading2, fontWeight: "700", fontSize: "1.6em", color: "#7dcfff" },
41+
{ tag: tags.heading3, fontWeight: "600", fontSize: "1.3em", color: "#bb9af7" },
42+
{ tag: tags.heading4, fontWeight: "600", fontSize: "1.1em", color: "#9d7cd8" },
43+
{ tag: tags.heading5, fontWeight: "600", color: "#73daca" },
4344
{ tag: tags.heading6, fontWeight: "600", color: "var(--text-muted)" },
44-
{ tag: tags.strong, fontWeight: "700" },
45-
{ tag: tags.emphasis, fontStyle: "italic" },
46-
{ tag: tags.strikethrough, textDecoration: "line-through" },
47-
{ tag: tags.link, color: "var(--link-color)", textDecoration: "underline" },
48-
{ tag: tags.url, color: "var(--text-muted)" },
45+
{ tag: tags.strong, fontWeight: "700", color: "#ff9e64" },
46+
{ tag: tags.emphasis, fontStyle: "italic", color: "#bb9af7" },
47+
{ tag: tags.strikethrough, textDecoration: "line-through", color: "var(--text-muted)" },
48+
{ tag: tags.link, color: "#7aa2f7", textDecoration: "underline" },
49+
{ tag: tags.url, color: "#565f89" },
4950
{
5051
tag: tags.monospace,
5152
fontFamily: "var(--font-mono)",
5253
fontSize: "0.9em",
5354
backgroundColor: "var(--code-bg)",
5455
borderRadius: "3px",
56+
color: "#9ece6a",
5557
},
5658
{ tag: tags.quote, color: "var(--text-secondary)" },
57-
{ tag: tags.meta, color: "var(--text-muted)" },
58-
{ tag: tags.processingInstruction, color: "var(--text-muted)" },
59+
{ tag: tags.meta, color: "#565f89" },
60+
{ tag: tags.processingInstruction, color: "#565f89" },
5961
]);
6062

6163
export const obsidianTheme = [
62-
obsidianDarkTheme,
63-
syntaxHighlighting(obsidianHighlight),
64+
tokyoNightTheme,
65+
syntaxHighlighting(tokyoNightHighlight),
6466
];

src/styles/editor.css

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,60 +20,61 @@
2020
}
2121

2222
.editor-area .cm-activeLine {
23-
background: rgba(255, 255, 255, 0.03);
23+
background: rgba(192, 202, 245, 0.03);
2424
}
2525

2626
.editor-area .cm-selectionBackground {
27-
background: rgba(127, 109, 242, 0.2) !important;
27+
background: #283457 !important;
2828
}
2929

3030
.editor-area .cm-cursor {
31-
border-left-color: var(--accent);
31+
border-left-color: var(--text-primary);
3232
}
3333

3434
.editor-area .cm-gutters {
3535
display: none;
3636
}
3737

38-
/* Markdown inline rendering styles */
39-
.cm-md-heading1 { font-size: 2em; font-weight: 700; line-height: 1.2; }
40-
.cm-md-heading2 { font-size: 1.6em; font-weight: 700; line-height: 1.3; }
41-
.cm-md-heading3 { font-size: 1.3em; font-weight: 600; line-height: 1.4; }
42-
.cm-md-heading4 { font-size: 1.1em; font-weight: 600; }
43-
.cm-md-heading5 { font-size: 1em; font-weight: 600; }
38+
/* Markdown inline rendering styles - Tokyo Night colors */
39+
.cm-md-heading1 { font-size: 2em; font-weight: 700; line-height: 1.2; color: var(--tn-blue); }
40+
.cm-md-heading2 { font-size: 1.6em; font-weight: 700; line-height: 1.3; color: var(--tn-cyan); }
41+
.cm-md-heading3 { font-size: 1.3em; font-weight: 600; line-height: 1.4; color: var(--tn-magenta); }
42+
.cm-md-heading4 { font-size: 1.1em; font-weight: 600; color: var(--tn-purple); }
43+
.cm-md-heading5 { font-size: 1em; font-weight: 600; color: var(--tn-teal); }
4444
.cm-md-heading6 { font-size: 0.9em; font-weight: 600; color: var(--text-muted); }
4545

46-
.cm-md-bold { font-weight: 700; }
47-
.cm-md-italic { font-style: italic; }
46+
.cm-md-bold { font-weight: 700; color: var(--tn-orange); }
47+
.cm-md-italic { font-style: italic; color: var(--tn-magenta); }
4848

4949
.cm-md-inline-code {
5050
background: var(--code-bg);
5151
border-radius: 3px;
5252
padding: 1px 4px;
5353
font-family: var(--font-mono);
5454
font-size: 0.9em;
55+
color: var(--tn-green);
5556
}
5657

5758
.cm-md-link {
58-
color: var(--link-color);
59+
color: var(--tn-blue);
5960
text-decoration: underline;
6061
text-decoration-color: var(--link-color-faded);
6162
cursor: pointer;
6263
}
6364

6465
.cm-md-bullet {
65-
color: var(--accent);
66+
color: var(--tn-cyan);
6667
font-size: 1.2em;
6768
}
6869

6970
.cm-md-blockquote {
70-
border-left: 3px solid var(--blockquote-border);
71+
border-left: 3px solid var(--tn-blue);
7172
padding-left: 12px;
7273
color: var(--text-secondary);
7374
}
7475

7576
.cm-md-hr {
7677
border: none;
77-
border-top: 1px solid var(--border-color);
78+
border-top: 1px solid var(--text-faint);
7879
margin: 8px 0;
7980
}

src/styles/variables.css

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
:root {
2+
/* Tokyo Night - Night variant */
3+
24
/* Background colors */
3-
--bg-primary: #1e1e1e;
4-
--bg-secondary: #252525;
5-
--bg-tertiary: #2d2d2d;
6-
--bg-hover: #353535;
7-
--bg-active: #3e3e3e;
5+
--bg-primary: #1a1b26;
6+
--bg-secondary: #16161e;
7+
--bg-tertiary: #1f2335;
8+
--bg-hover: #283457;
9+
--bg-active: #3d59a1;
810

911
/* Text colors */
10-
--text-primary: #dcddde;
11-
--text-secondary: #a0a0a0;
12-
--text-muted: #777;
13-
--text-faint: #555;
12+
--text-primary: #c0caf5;
13+
--text-secondary: #a9b1d6;
14+
--text-muted: #565f89;
15+
--text-faint: #3b4261;
1416

15-
/* Accent */
16-
--accent: #7f6df2;
17-
--accent-hover: #8b7cf3;
18-
--link-color: #7f6df2;
19-
--link-color-faded: rgba(127, 109, 242, 0.4);
17+
/* Accent - Tokyo Night blue */
18+
--accent: #7aa2f7;
19+
--accent-hover: #89b4fa;
20+
--link-color: #7aa2f7;
21+
--link-color-faded: rgba(122, 162, 247, 0.4);
2022

2123
/* Borders */
22-
--border-color: #333;
23-
--divider-color: #2a2a2a;
24+
--border-color: #1f2335;
25+
--divider-color: #16161e;
2426

2527
/* Code */
26-
--code-bg: rgba(255, 255, 255, 0.06);
28+
--code-bg: rgba(122, 162, 247, 0.1);
2729

2830
/* Blockquote */
29-
--blockquote-border: #555;
31+
--blockquote-border: #3d59a1;
3032

3133
/* Fonts */
3234
--font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
@@ -38,4 +40,15 @@
3840
--sidebar-width: 250px;
3941
--tab-height: 36px;
4042
--status-height: 24px;
43+
44+
/* Extra Tokyo Night colors for markdown elements */
45+
--tn-blue: #7aa2f7;
46+
--tn-purple: #9d7cd8;
47+
--tn-cyan: #7dcfff;
48+
--tn-green: #9ece6a;
49+
--tn-red: #f7768e;
50+
--tn-yellow: #e0af68;
51+
--tn-orange: #ff9e64;
52+
--tn-magenta: #bb9af7;
53+
--tn-teal: #73daca;
4154
}

0 commit comments

Comments
 (0)