Allow theme override keys
This commit is contained in:
@@ -75,6 +75,9 @@ const sapphireColorSet: IColorSet = {
|
|||||||
brightMagenta: sapphireColors.pink,
|
brightMagenta: sapphireColors.pink,
|
||||||
brightCyan: sapphireColors.teal,
|
brightCyan: sapphireColors.teal,
|
||||||
brightWhite: '#efefef'
|
brightWhite: '#efefef'
|
||||||
|
},
|
||||||
|
overrides: {
|
||||||
|
"editorError.foreground": "#ff0000"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"watch": "tsc -w",
|
"watch": "tsc -w",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"prestart": "tsc demo/generate.js",
|
"prestart": "tsc demo/generate.ts",
|
||||||
"start": "node demo/generate.js",
|
"start": "node demo/generate.js",
|
||||||
"prepublish": "npm run build"
|
"prepublish": "npm run build"
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-1
@@ -74,5 +74,6 @@ export interface IColorSet {
|
|||||||
brightMagenta?: string;
|
brightMagenta?: string;
|
||||||
brightCyan?: string;
|
brightCyan?: string;
|
||||||
brightWhite?: string;
|
brightWhite?: string;
|
||||||
}
|
},
|
||||||
|
overrides?: { [key: string]: string }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,7 +307,13 @@ export class VscodeThemeGenerator implements IThemeGenerator {
|
|||||||
// debugToolBar.background: Debug toolbar background color.
|
// debugToolBar.background: Debug toolbar background color.
|
||||||
theme.colors['debugToolBar.background'] = background4;
|
theme.colors['debugToolBar.background'] = background4;
|
||||||
|
|
||||||
// v1.13 colors
|
|
||||||
theme.colors['selection.background'] = colorSet.base.color1;
|
theme.colors['selection.background'] = colorSet.base.color1;
|
||||||
|
|
||||||
|
if (colorSet.overrides) {
|
||||||
|
const keys = Object.keys(colorSet.overrides);
|
||||||
|
keys.forEach(key => {
|
||||||
|
theme.colors[key] = colorSet.overrides[key];
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user