From 14556a9749897fe7d189b639a88242cfd1e997e6 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 30 Jan 2017 01:30:07 -0800 Subject: [PATCH] Start building out selections --- src/index.ts | 12 +++++++++++- src/themeGenerator.ts | 15 +++++++++++++++ src/vscodeThemeGenerator.ts | 19 +++++++++++++------ 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index b3929f0..3465a7e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,6 +46,7 @@ const colorset2colors = { red: '#DA6771', redLight: '#e5949b', green: '#4EB071', + greenDim: '#275839', yellow: '#fff099', blue: '#399EF4', blueLight: '#9fcff9', @@ -73,7 +74,16 @@ const colorSet2: IColorSet = { ui: { background: '#151B24', foreground: '#efefef', - cursor: '#ffffff' + cursor: '#ffffff', + invisibles: '#263040', + rangeHighlight: '#263040', + findMatchHighlight: '#4e2e62', + currentFindMatchHighlight: '#864fa9', + selection: '#153958', + selectionHighlight: '#3b404c', + wordHighlight: colorset2colors.greenDim, + wordHighlightStrong: colorset2colors.greenDim, + activeLinkForeground: colorset2colors.blue } }; const themeJson = new VscodeThemeGenerator().generateTheme('Generated theme 2', colorSet2); diff --git a/src/themeGenerator.ts b/src/themeGenerator.ts index 001a45f..2ca17e3 100644 --- a/src/themeGenerator.ts +++ b/src/themeGenerator.ts @@ -26,7 +26,22 @@ export interface IColorSet { foreground?: string; /** The color of the editor cursor/caret */ cursor?: string; + /** Indent guide */ + invisibles?: string; + /** Line highlight, this will remove the line borders in favor of a solid highlight */ + lineHighlight?: string; + findMatchHighlight?: string; + currentFindMatchHighlight?: string; + findRangeHighlight?: string; + /** Highlights the line(s) of the current find match, this also applies to things like find symbol */ + rangeHighlight?: string; + /** Highlights strings that match the current selection, excluding the selection itself */ selectionHighlight?: string; + + selection?: string; + wordHighlight?: string; + wordHighlightStrong?: string; + activeLinkForeground?: string; } } diff --git a/src/vscodeThemeGenerator.ts b/src/vscodeThemeGenerator.ts index 946a042..5c1b29a 100644 --- a/src/vscodeThemeGenerator.ts +++ b/src/vscodeThemeGenerator.ts @@ -73,12 +73,19 @@ function getSimpleColorGenerator(name: string, scope: string, fontStyle: number const vscodeJsonGlobalThemeRules: IRuleGenerator[] = [ // Global settings - { source: set => set.ui.background, - generate: getGlobalSettingGenerator('background') }, - { source: set => set.ui.foreground, - generate: getGlobalSettingGenerator('foreground') }, - { source: set => set.ui.cursor, - generate: getGlobalSettingGenerator('caret') } + { source: set => set.ui.background, generate: getGlobalSettingGenerator('background') }, + { source: set => set.ui.foreground, generate: getGlobalSettingGenerator('foreground') }, + { source: set => set.ui.cursor, generate: getGlobalSettingGenerator('caret') }, + { source: set => set.ui.invisibles, generate: getGlobalSettingGenerator('invisibles') }, + { source: set => set.ui.findMatchHighlight, generate: getGlobalSettingGenerator('findMatchHighlight') }, + { source: set => set.ui.currentFindMatchHighlight, generate: getGlobalSettingGenerator('currentFindMatchHighlight') }, + { source: set => set.ui.findRangeHighlight, generate: getGlobalSettingGenerator('findRangeHighlight') }, + { source: set => set.ui.rangeHighlight, generate: getGlobalSettingGenerator('rangeHighlight') }, + { source: set => set.ui.selection, generate: getGlobalSettingGenerator('selection') }, + { source: set => set.ui.selectionHighlight, generate: getGlobalSettingGenerator('selectionHighlight') }, + { source: set => set.ui.wordHighlight, generate: getGlobalSettingGenerator('wordHighlight') }, + { source: set => set.ui.wordHighlightStrong, generate: getGlobalSettingGenerator('wordHighlightStrong') }, + { source: set => set.ui.activeLinkForeground, generate: getGlobalSettingGenerator('activeLinkForeground') } ]; // An ordered list of rules to be applied if the source conditions are met