-
Notifications
You must be signed in to change notification settings - Fork 5
/
shiki.config.mjs
46 lines (42 loc) · 1.58 KB
/
shiki.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
35
36
37
38
39
40
41
42
43
44
45
46
'use strict';
import { getWasmInstance } from '@shikijs/core/wasm-inlined';
import cLanguage from 'shiki/langs/c.mjs';
import coffeeScriptLanguage from 'shiki/langs/coffeescript.mjs';
import cPlusPlusLanguage from 'shiki/langs/cpp.mjs';
import diffLanguage from 'shiki/langs/diff.mjs';
import dockerLanguage from 'shiki/langs/docker.mjs';
import httpLanguage from 'shiki/langs/http.mjs';
import javaScriptLanguage from 'shiki/langs/javascript.mjs';
import jsonLanguage from 'shiki/langs/json.mjs';
import powershellLanguage from 'shiki/langs/powershell.mjs';
import shellScriptLanguage from 'shiki/langs/shellscript.mjs';
import shellSessionLanguage from 'shiki/langs/shellsession.mjs';
import typeScriptLanguage from 'shiki/langs/typescript.mjs';
import lightTheme from 'shiki/themes/catppuccin-latte.mjs';
import darkTheme from 'shiki/themes/catppuccin-mocha.mjs';
/**
* Creates a Shiki configuration for the API Docs tooling
*
* @type {import('@shikijs/core').HighlighterCoreOptions}
*/
export default {
loadWasm: getWasmInstance,
// Only register the themes we need, to support light/dark theme
themes: [lightTheme, darkTheme],
// Only register the languages that the API docs use
// and override the JavaScript language with the aliases
langs: [
{ ...javaScriptLanguage[0], aliases: ['mjs', 'cjs', 'js'] },
...jsonLanguage,
...typeScriptLanguage,
...shellScriptLanguage,
...powershellLanguage,
...shellSessionLanguage,
...dockerLanguage,
...diffLanguage,
...cLanguage,
...cPlusPlusLanguage,
...httpLanguage,
...coffeeScriptLanguage,
],
};