-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathec.config.mjs
More file actions
63 lines (56 loc) · 1.98 KB
/
ec.config.mjs
File metadata and controls
63 lines (56 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { defineEcConfig, setLuminance, setAlpha } from 'astro-expressive-code'
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'
import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections'
// https://expressive-code.com/reference/configuration/
export default defineEcConfig({
/* Basics */
defaultLocale: 'en-US',
defaultProps: {
preserveIndent: true,
wrap: false,
showLineNumbers: false,
},
minSyntaxHighlightingColorContrast: 0,
/* Plugins */
plugins: [pluginLineNumbers(), pluginCollapsibleSections()],
/* Styles */
styleOverrides: {
uiFontFamily: "'DM Mono', 'Input Mono', 'Fira Code', 'monospace'",
uiFontSize: '1em',
codeBackground: (context) =>
context.theme.name === 'vitesse-dark' ? '#0e0e0e' : '#fafafa',
codeFontFamily: "'DM Mono', 'Input Mono', 'Fira Code', 'monospace'",
codeFontSize: '14.72px',
codeLineHeight: '1.4',
codePaddingBlock: '0.8571429em',
codePaddingInline: '1.1428571em',
/* Editor & Terminal Frames */
frames: {
frameBoxShadowCssValue: 'none',
inlineButtonBackgroundActiveOpacity: '0.2',
inlineButtonBackgroundHoverOrFocusOpacity: '0.1',
terminalBackground: ({ theme }) =>
theme.name === 'vitesse-dark' ? '#0e0e0e' : '#fafafa',
tooltipSuccessBackground: ({ theme }) =>
setLuminance(theme.colors['terminal.ansiGreen'] || '#0dbc79', 0.22),
},
/* Text & Line Markers */
textMarkers: {
backgroundOpacity: '0.25',
borderOpacity: '0.5',
},
/* Collapsible Sections */
collapsibleSections: {
closedBackgroundColor: ({ theme }) =>
setAlpha(theme.colors['editor.foldBackground'], 0.06) ||
'rgb(84 174 255 / 20%)',
},
},
/* Theme */
themes: ['vitesse-dark', 'vitesse-light'],
themeCssRoot: ':root',
themeCssSelector: (theme) =>
theme.name === 'vitesse-dark' ? ':root.dark' : ':root:not(.dark)',
useDarkModeMediaQuery: false,
useStyleReset: false,
})