Skip to content

Commit 297ab45

Browse files
committed
Fix light theme syntax highlighting
1 parent 08b694b commit 297ab45

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

web/ec.config.mjs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
11
import { readFileSync } from 'fs';
22

33
import githubDark from 'tm-themes/themes/github-dark.json' with { type: 'json' };
4+
import githubLight from 'tm-themes/themes/github-light.json' with { type: 'json' };
5+
46
const mtaLuaDark = JSON.parse(readFileSync('./src/themes/mtasa_lua-theme_dark.json', 'utf-8'));
7+
const mtaLuaLight = JSON.parse(readFileSync('./src/themes/mtasa_lua-theme_light.json', 'utf-8'));
58

6-
const hybridTheme = {
9+
const hybridDarkTheme = {
710
...githubDark,
811
tokenColors: [
912
...githubDark.tokenColors,
1013
...mtaLuaDark.tokenColors,
1114
],
12-
colors: [mtaLuaDark.colors]
15+
colors: {
16+
...githubDark.colors,
17+
...mtaLuaDark.colors
18+
}
19+
};
20+
21+
const hybridLightTheme = {
22+
...githubLight,
23+
tokenColors: [
24+
...githubLight.tokenColors,
25+
...mtaLuaLight.tokenColors,
26+
],
27+
colors: {
28+
...githubLight.colors,
29+
...mtaLuaLight.colors
30+
}
1331
};
1432

1533
export default {
16-
themes: [hybridTheme],
34+
themes: [hybridDarkTheme, hybridLightTheme],
1735
shiki: {
1836
langs: [
1937
{
2038
id: 'lua',
2139
scopeName: 'source.lua.mta',
2240
...JSON.parse(readFileSync('./src/grammars/lua-mta.tmLanguage.json', 'utf-8')),
2341
},
24-
],
25-
},
26-
};
42+
]
43+
}
44+
};

0 commit comments

Comments
 (0)