forked from unionlabs/union
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathec.config.mjs
34 lines (32 loc) · 1.06 KB
/
ec.config.mjs
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
import ecTwoSlash from "expressive-code-twoslash"
import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers"
import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections"
/**
* @typedef {ReturnType<typeof import('@expressive-code/plugin-line-numbers')['pluginLineNumbers']>} ECPlugin
* @typedef {import('@astrojs/starlight/expressive-code').StarlightExpressiveCodeOptions} EC
* @typedef {EC & { plugins?: any; defaultProps: EC["defaultProps"] & { showLineNumbers?: boolean } }} ModifiedEC
*/
/** @type {ModifiedEC} */
// @ts-expect-error
export default {
logger: true,
frames: {
extractFileNameFromCode: true,
showCopyToClipboardButton: true,
removeCommentsWhenCopyingTerminalFrames: true
},
defaultProps: {
showLineNumbers: false
},
useStarlightDarkModeSwitch: true,
themes: ["github-light", "houston"],
plugins: [
ecTwoSlash({
includeJsDoc: true,
explicitTrigger: true,
languages: ["ts", "tsx", "js", "jsx"]
}),
pluginLineNumbers(),
pluginCollapsibleSections()
]
}