Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add some comments
Nate Butler3b19a409f8b5
diff --git a/styles/src/themes/common/syntax.ts b/styles/src/themes/common/syntax.tsindex 6faf48852f0..28600c4df4a 100644--- a/styles/src/themes/common/syntax.ts+++ b/styles/src/themes/common/syntax.ts@@ -8,10 +8,13 @@ const defaultSyntaxHighlightStyle: Omit<SyntaxHighlightStyle, "color"> = {}function buildDefaultSyntax(colorScheme: ColorScheme): Syntax {+ // Make a temporary object that is allowed to be missing+ // the "color" property for each styleconst syntax: {[key: string]: Omit<SyntaxHighlightStyle, "color">} = {}+ // then spread the default to each stylefor (const key of Object.keys({} as Syntax)) {syntax[key as keyof Syntax] = {...defaultSyntaxHighlightStyle@@ -22,6 +25,7 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax {comment: colorScheme.ramps.neutral(0.71).hex()}+ // Then assign colors and use Syntax to enforce each style getting it's own colorconst defaultSyntax: Syntax = {...syntax,comment: {