@uiw/codemirror-theme-eclipse
Version:
Theme eclipse for CodeMirror.
68 lines • 1.4 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
export var defaultSettingsEclipse = {
background: '#fff',
foreground: '#000',
caret: '#FFFFFF',
selection: '#d7d4f0',
selectionMatch: '#d7d4f0',
gutterBackground: '#f7f7f7',
gutterForeground: '#999',
lineHighlight: '#006fff1c',
gutterBorder: 'transparent'
};
export var eclipseLightStyle = [{
tag: [t.comment],
color: '#3F7F5F'
}, {
tag: [t.documentMeta],
color: '#FF1717'
}, {
tag: t.keyword,
color: '#7F0055',
fontWeight: 'bold'
}, {
tag: t.atom,
color: '#00f'
}, {
tag: t.number,
color: '#164'
}, {
tag: t.propertyName,
color: '#164'
}, {
tag: [t.variableName, t.definition(t.variableName)],
color: '#0000C0'
}, {
tag: t.function(t.variableName),
color: '#0000C0'
}, {
tag: t.string,
color: '#2A00FF'
}, {
tag: t.operator,
color: 'black'
}, {
tag: t.tagName,
color: '#170'
}, {
tag: t.attributeName,
color: '#00c'
}, {
tag: t.link,
color: '#219'
}];
export var eclipseInit = options => {
var {
theme = 'light',
settings = {},
styles = []
} = options || {};
return createTheme({
theme: theme,
settings: _extends({}, defaultSettingsEclipse, settings),
styles: [...eclipseLightStyle, ...styles]
});
};
export var eclipse = eclipseInit();