mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 10:20:51 +00:00
Use syntax
as merged name instead of mergedSyntax
This lets us retain the existing uses of syntax, and fixes colors that were being assigned incorrectly.
This commit is contained in:
parent
23c967418a
commit
4f307c7601
1 changed files with 5 additions and 5 deletions
|
@ -38,7 +38,7 @@ export default function editor(colorScheme: ColorScheme) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const syntax: Syntax = {
|
const defaultSyntax: Syntax = {
|
||||||
primary: {
|
primary: {
|
||||||
color: colorScheme.ramps.neutral(1).hex(),
|
color: colorScheme.ramps.neutral(1).hex(),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
|
@ -134,10 +134,10 @@ export default function editor(colorScheme: ColorScheme) {
|
||||||
|
|
||||||
function createSyntax(colorScheme: ColorScheme): Syntax {
|
function createSyntax(colorScheme: ColorScheme): Syntax {
|
||||||
if (!colorScheme.syntax) {
|
if (!colorScheme.syntax) {
|
||||||
return syntax
|
return defaultSyntax
|
||||||
}
|
}
|
||||||
|
|
||||||
return deepmerge<Syntax, Partial<ThemeSyntax>>(syntax, colorScheme.syntax, {
|
return deepmerge<Syntax, Partial<ThemeSyntax>>(defaultSyntax, colorScheme.syntax, {
|
||||||
arrayMerge: (destinationArray, sourceArray) => [
|
arrayMerge: (destinationArray, sourceArray) => [
|
||||||
...destinationArray,
|
...destinationArray,
|
||||||
...sourceArray,
|
...sourceArray,
|
||||||
|
@ -145,7 +145,7 @@ export default function editor(colorScheme: ColorScheme) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const mergedSyntax = createSyntax(colorScheme)
|
const syntax = createSyntax(colorScheme)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
textColor: syntax.primary.color,
|
textColor: syntax.primary.color,
|
||||||
|
@ -303,6 +303,6 @@ export default function editor(colorScheme: ColorScheme) {
|
||||||
color: borderColor(layer),
|
color: borderColor(layer),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
syntax: mergedSyntax,
|
syntax,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue