Start building out selections

This commit is contained in:
Daniel Imms
2017-01-30 01:30:07 -08:00
parent d4a0380d00
commit 14556a9749
3 changed files with 39 additions and 7 deletions

View File

@@ -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);

View File

@@ -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;
}
}

View File

@@ -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