Skip to content

Commit c65e18c

Browse files
committed
syntax tweaks to match vscode
updates: special vars, built-in types/vars, attributes, str escapes, and constructors.
1 parent 994bdfd commit c65e18c

2 files changed

Lines changed: 331 additions & 70 deletions

File tree

src/theme.js

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ export function getTheme({ themeKey, name, type }) {
5959
appearance: type,
6060
name,
6161
style: {
62+
"background.appearance": "opaque",
63+
6264
"background": tokens['bgColor/default'],
6365
"border": tokens['borderColor/default'],
6466

@@ -241,7 +243,7 @@ export function getTheme({ themeKey, name, type }) {
241243

242244
"syntax": {
243245
"attribute": {
244-
"color": null,
246+
"color": lightDark("base/color/blue/6", "base/color/blue/2"),
245247
"font_style": null,
246248
"font_weight": null
247249
},
@@ -266,7 +268,7 @@ export function getTheme({ themeKey, name, type }) {
266268
"font_weight": null
267269
},
268270
"constructor": {
269-
"color": lightDark("base/color/blue/6", "base/color/blue/2"),
271+
"color": lightDark("base/color/red/5", "base/color/red/3"),
270272
"font_style": null,
271273
"font_weight": null
272274
},
@@ -356,12 +358,17 @@ export function getTheme({ themeKey, name, type }) {
356358
"font_weight": null
357359
},
358360
"property": {
359-
"color": lightDark("base/color/blue/6", "base/color/blue/2"),
361+
"color": tokens["fgColor/default"],
362+
"font_style": null,
363+
"font_weight": null
364+
},
365+
"property.json_key": {
366+
"color": lightDark("base/color/green/6", "base/color/green/1"),
360367
"font_style": null,
361368
"font_weight": null
362369
},
363370
"punctuation": {
364-
"color": tokens["fgColor/default"],
371+
"color": lightDark("base/color/red/5", "base/color/red/3"),
365372
"font_style": null,
366373
"font_weight": null
367374
},
@@ -375,6 +382,11 @@ export function getTheme({ themeKey, name, type }) {
375382
"font_style": null,
376383
"font_weight": null
377384
},
385+
"punctuation.delimiter.jsx": {
386+
"color": lightDark("base/color/red/5", "base/color/red/3"),
387+
"font_style": null,
388+
"font_weight": null
389+
},
378390
"punctuation.list_marker": {
379391
"color": lightDark("base/color/orange/6", "base/color/orange/2"),
380392
"font_style": null,
@@ -391,9 +403,9 @@ export function getTheme({ themeKey, name, type }) {
391403
"font_weight": null
392404
},
393405
"string.escape": {
394-
"color": lightDark("base/color/green/6", "base/color/green/1"),
406+
"color": lightDark("base/color/red/5", "base/color/red/3"),
395407
"font_style": null,
396-
"font_weight": 700
408+
"font_weight": null
397409
},
398410
"string.regex": {
399411
"color": lightDark("base/color/blue/8", "base/color/blue/1"),
@@ -430,13 +442,28 @@ export function getTheme({ themeKey, name, type }) {
430442
"font_style": null,
431443
"font_weight": null
432444
},
445+
"type.builtin": {
446+
"color": lightDark("base/color/blue/6", "base/color/blue/2"),
447+
"font_style": null,
448+
"font_weight": null
449+
},
433450
"variable": {
434451
"color": tokens["fgColor/default"],
435452
"font_style": null,
436453
"font_weight": null
437454
},
455+
"variable.builtin": {
456+
"color": lightDark("base/color/blue/6", "base/color/blue/2"),
457+
"font_style": null,
458+
"font_weight": null
459+
},
460+
"variable.parameter": {
461+
"color": lightDark("base/color/orange/6", "base/color/orange/2"),
462+
"font_style": null,
463+
"font_weight": null
464+
},
438465
"variable.special": {
439-
"color": lightDark("base/color/red/5", "base/color/red/3"),
466+
"color": lightDark("base/color/blue/6", "base/color/blue/2"),
440467
"font_style": null,
441468
"font_weight": null
442469
},

0 commit comments

Comments
 (0)