forked from nodejs/nodejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shiki.config.mjs
55 lines (51 loc) · 1.46 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
47
48
49
50
51
52
53
54
55
'use strict';
/**
* READ: This file allows us to configure a subset of languages that we want to support on the Node.js Website
* we use `shikiji` which is an ESM-only rewrite of Shiki
*/
import diffLanguage from 'shikiji/langs/diff.mjs';
import dockerLanguage from 'shikiji/langs/docker.mjs';
import javaScriptLanguage from 'shikiji/langs/javascript.mjs';
import jsonLanguage from 'shikiji/langs/json.mjs';
import shellScriptLanguage from 'shikiji/langs/shellscript.mjs';
import shellSessionLanguage from 'shikiji/langs/shellsession.mjs';
import typeScriptLanguage from 'shikiji/langs/typescript.mjs';
import shikiNordTheme from 'shikiji/themes/nord.mjs';
/** @type {import('shikiji').LanguageRegistration[]} */
export const LANGUAGES = [
{
...javaScriptLanguage[0],
scopeName: 'source.js',
aliases: ['mjs', 'cjs', 'js'],
},
{
...jsonLanguage[0],
scopeName: 'source.json',
},
{
...typeScriptLanguage[0],
scopeName: 'source.ts',
aliases: ['ts'],
},
{
...shellScriptLanguage[0],
scopeName: 'source.shell',
aliases: ['bash', 'sh', 'shell', 'zsh'],
},
{
...shellSessionLanguage[0],
scopeName: 'text.shell-session',
aliases: ['console'],
},
{
...dockerLanguage[0],
scopeName: 'source.dockerfile',
aliases: ['dockerfile'],
},
{
...diffLanguage[0],
scopeName: 'source.diff',
},
];
// This is the default theme we use for our Shiki Syntax Highlighter
export const DEFAULT_THEME = shikiNordTheme;