Skip to content

Commit 956e071

Browse files
committed
main
1 parent 26f1447 commit 956e071

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/.vitepress/config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ const vitepressConfig = defineConfig({
1717
markdown: {
1818
lineNumbers: true,
1919
theme: {
20-
light: await themeService.getTheme('JetBrains Rider New UI theme - Light'),
20+
// light: await themeService.getTheme('Eva Light'),
2121
// dark: await themeService.getTheme('Eva Dark'),
22+
light: await themeService.getTheme('JetBrains Rider New UI theme - Light'),
2223
dark: await themeService.getTheme('JetBrains Rider New UI theme - Dark'),
2324
},
2425
codeTransformers: [transformerTwoslash()],

docs/services/ThemeService.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ class ThemeService implements IThemeService {
5656
async register(theme: TextmateTheme): Promise<void> {
5757
if (this.isThemeRegistered(theme.name as ThemeName)) return;
5858
if (theme.name.includes('Eva')) {
59-
const foo = theme.tokenColors.filter(x => x.scope.startsWith('comment'))[0];
60-
foo.settings.fontStyle = '';
59+
theme.tokenColors.push({
60+
scope: 'comment',
61+
settings: {
62+
foreground: theme.name.includes('Dark') ? '#676e59' : '#a9a9aa',
63+
fontStyle: '',
64+
},
65+
});
6166
}
6267
await this.innerThemeService.loadTheme(theme);
6368
}
@@ -86,6 +91,12 @@ class ThemeService implements IThemeService {
8691
const [themeName, info] = x;
8792
const theme = await this.fetchThemeObject(info);
8893
if (!theme.name) theme.name = themeName; // in case the theme does not have a name to indentify itself
94+
if (themeName === 'JetBrains Rider New UI theme - Dark') {
95+
theme.tokenColors.push({
96+
scope: 'keyword.operator',
97+
settings: { foreground: '#6C95EB' },
98+
});
99+
}
89100
await this.register(theme);
90101
console.log(`Textmate theme: \`${themeName}\` has loaded.`);
91102
}),

0 commit comments

Comments
 (0)