|
| 1 | +// This file can be used in the browser, but because of the weight of all the language |
| 2 | +// definitions, preferably it should be used on the server. |
| 3 | + |
| 4 | +import type { LanguageFn } from 'highlight.js'; |
| 5 | +import bash from 'highlight.js/lib/languages/bash'; |
| 6 | +import cpp from 'highlight.js/lib/languages/cpp'; |
| 7 | +import csharp from 'highlight.js/lib/languages/csharp'; |
| 8 | +import css from 'highlight.js/lib/languages/css'; |
| 9 | +import dart from 'highlight.js/lib/languages/dart'; |
| 10 | +import dos from 'highlight.js/lib/languages/dos'; |
| 11 | +import diff from 'highlight.js/lib/languages/diff'; |
| 12 | +import erlang from 'highlight.js/lib/languages/erlang'; |
| 13 | +import elixir from 'highlight.js/lib/languages/elixir'; |
| 14 | +import plaintext from 'highlight.js/lib/languages/plaintext'; |
| 15 | +import go from 'highlight.js/lib/languages/go'; |
| 16 | +import http from 'highlight.js/lib/languages/http'; |
| 17 | +import java from 'highlight.js/lib/languages/java'; |
| 18 | +import javascript from 'highlight.js/lib/languages/javascript'; |
| 19 | +import typescript from 'highlight.js/lib/languages/typescript'; |
| 20 | +import json from 'highlight.js/lib/languages/json'; |
| 21 | +import objectivec from 'highlight.js/lib/languages/objectivec'; |
| 22 | +import php from 'highlight.js/lib/languages/php'; |
| 23 | +import python from 'highlight.js/lib/languages/python'; |
| 24 | +import ruby from 'highlight.js/lib/languages/ruby'; |
| 25 | +import swift from 'highlight.js/lib/languages/swift'; |
| 26 | +import kotlin from 'highlight.js/lib/languages/kotlin'; |
| 27 | +import sql from 'highlight.js/lib/languages/sql'; |
| 28 | +import xml from 'highlight.js/lib/languages/xml'; |
| 29 | +import yaml from 'highlight.js/lib/languages/yaml'; |
| 30 | +import curl from 'highlightjs-curl/src/languages/curl'; |
| 31 | + |
| 32 | +const registry: { label: string; key: string; module: LanguageFn }[] = [ |
| 33 | + { label: 'Text', key: 'text', module: plaintext }, |
| 34 | + { label: 'JS', key: 'javascript', module: javascript }, |
| 35 | + { label: 'TS', key: 'typescript', module: typescript }, |
| 36 | + { label: 'Java', key: 'java', module: java }, |
| 37 | + { label: 'Ruby', key: 'ruby', module: ruby }, |
| 38 | + { label: 'Python', key: 'python', module: python }, |
| 39 | + { label: 'PHP', key: 'php', module: php }, |
| 40 | + { label: 'Shell', key: 'bash', module: bash }, |
| 41 | + { label: 'C#', key: 'cs', module: csharp }, |
| 42 | + { label: 'CSS', key: 'css', module: css }, |
| 43 | + { label: 'Go', key: 'go', module: go }, |
| 44 | + { label: 'HTML', key: 'xml', module: xml }, |
| 45 | + { label: 'HTTP', key: 'http', module: http }, |
| 46 | + { label: 'C++', key: 'cpp', module: cpp }, |
| 47 | + { label: 'Dart', key: 'dart', module: dart }, |
| 48 | + { label: 'Swift', key: 'swift', module: swift }, |
| 49 | + { label: 'Kotlin', key: 'kotlin', module: kotlin }, |
| 50 | + { label: 'Objective C', key: 'objectivec', module: objectivec }, |
| 51 | + { label: 'Node.js', key: 'javascript', module: javascript }, |
| 52 | + { label: 'JSON', key: 'json', module: json }, |
| 53 | + { label: 'DOS', key: 'dos', module: dos }, |
| 54 | + { label: 'YAML', key: 'yaml', module: yaml }, |
| 55 | + { label: 'Erlang', key: 'erlang', module: erlang }, |
| 56 | + { label: 'Elixir', key: 'elixir', module: elixir }, |
| 57 | + { label: 'Diff', key: 'diff', module: diff }, |
| 58 | + { label: 'SQL', key: 'sql', module: sql }, |
| 59 | + { label: 'cURL', key: 'curl', module: curl }, |
| 60 | + { label: 'HTML', key: 'html', module: xml }, |
| 61 | + { label: 'XML', key: 'xml', module: xml }, |
| 62 | +]; |
| 63 | + |
| 64 | +export default registry; |
0 commit comments