diff --git a/package-lock.json b/package-lock.json index 5914631..834619f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,9 +10,9 @@ "dependencies": { "json5": "^2.1.3", "marked": "^4.0.15", - "oniguruma": "^7.2.1", - "shiki": "^0.2.5", - "shiki-themes": "^0.2.5" + "shiki": "^0.14.1", + "shiki-themes": "^0.2.5", + "vscode-oniguruma": "^1.7.0" }, "devDependencies": { "@types/json5": "0.0.30", @@ -569,6 +569,11 @@ "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", + "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==" + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1786,6 +1791,11 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -1867,14 +1877,6 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/marked": { "version": "4.0.15", "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.15.tgz", @@ -1963,11 +1965,6 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "node_modules/nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2022,23 +2019,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/onigasm": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/onigasm/-/onigasm-2.2.5.tgz", - "integrity": "sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==", - "dependencies": { - "lru-cache": "^5.1.1" - } - }, - "node_modules/oniguruma": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/oniguruma/-/oniguruma-7.2.1.tgz", - "integrity": "sha512-WPS/e1uzhswPtJSe+Zls/kAj27+lEqZjCmRSjnYk/Z4L2Mu+lJC2JWtkZhPJe4kZeTQfz7ClcLyXlI4J68MG2w==", - "hasInstallScript": true, - "dependencies": { - "nan": "^2.14.0" - } - }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -2429,22 +2409,14 @@ } }, "node_modules/shiki": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.2.5.tgz", - "integrity": "sha512-TwiRLuon4m+TMZ8Qdx8VgtIj4edzxmFjW+I7IjI7xyf2b7WjTXrynuk4iDMCjdsb8zVd9oFCxqhfyNC8LGeDNQ==", - "dependencies": { - "onigasm": "^2.2.1", - "shiki-languages": "^0.2.5", - "shiki-themes": "^0.2.5", - "vscode-textmate": "^5.2.0" - } - }, - "node_modules/shiki-languages": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/shiki-languages/-/shiki-languages-0.2.5.tgz", - "integrity": "sha512-M3q1BFE2Qk/w72K9GM8kZaZ2yVSP4wd1gep9sYWaLJWQN4GhTuqC1oJrmX0JBX1PHECJqi39ZGYD39rQ6qrVvw==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.1.tgz", + "integrity": "sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==", "dependencies": { - "vscode-textmate": "^5.2.0" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "node_modules/shiki-themes": { @@ -2456,6 +2428,11 @@ "vscode-textmate": "^5.2.0" } }, + "node_modules/shiki/node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==" + }, "node_modules/signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -2917,6 +2894,11 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" + }, "node_modules/vscode-textmate": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", @@ -3163,11 +3145,6 @@ "engines": { "node": ">=4" } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } }, "dependencies": { @@ -3593,6 +3570,11 @@ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, + "ansi-sequence-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", + "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==" + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -4521,6 +4503,11 @@ "minimist": "^1.2.5" } }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4586,14 +4573,6 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, "marked": { "version": "4.0.15", "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.15.tgz", @@ -4661,11 +4640,6 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4711,22 +4685,6 @@ "mimic-fn": "^2.1.0" } }, - "onigasm": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/onigasm/-/onigasm-2.2.5.tgz", - "integrity": "sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==", - "requires": { - "lru-cache": "^5.1.1" - } - }, - "oniguruma": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/oniguruma/-/oniguruma-7.2.1.tgz", - "integrity": "sha512-WPS/e1uzhswPtJSe+Zls/kAj27+lEqZjCmRSjnYk/Z4L2Mu+lJC2JWtkZhPJe4kZeTQfz7ClcLyXlI4J68MG2w==", - "requires": { - "nan": "^2.14.0" - } - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -5019,22 +4977,21 @@ "dev": true }, "shiki": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.2.5.tgz", - "integrity": "sha512-TwiRLuon4m+TMZ8Qdx8VgtIj4edzxmFjW+I7IjI7xyf2b7WjTXrynuk4iDMCjdsb8zVd9oFCxqhfyNC8LGeDNQ==", - "requires": { - "onigasm": "^2.2.1", - "shiki-languages": "^0.2.5", - "shiki-themes": "^0.2.5", - "vscode-textmate": "^5.2.0" - } - }, - "shiki-languages": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/shiki-languages/-/shiki-languages-0.2.5.tgz", - "integrity": "sha512-M3q1BFE2Qk/w72K9GM8kZaZ2yVSP4wd1gep9sYWaLJWQN4GhTuqC1oJrmX0JBX1PHECJqi39ZGYD39rQ6qrVvw==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.1.tgz", + "integrity": "sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==", "requires": { - "vscode-textmate": "^5.2.0" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + }, + "dependencies": { + "vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==" + } } }, "shiki-themes": { @@ -5391,6 +5348,11 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" + }, "vscode-textmate": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", @@ -5565,11 +5527,6 @@ "requires": { "mkdirp": "^0.5.1" } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } } diff --git a/package.json b/package.json index da4d3b4..596cded 100644 --- a/package.json +++ b/package.json @@ -114,9 +114,9 @@ "dependencies": { "json5": "^2.1.3", "marked": "^4.0.15", - "oniguruma": "^7.2.1", - "shiki": "^0.2.5", - "shiki-themes": "^0.2.5" + "shiki": "^0.14.1", + "shiki-themes": "^0.2.5", + "vscode-oniguruma": "^1.7.0" }, "devDependencies": { "@types/json5": "0.0.30", diff --git a/src/codeHighlighter.ts b/src/codeHighlighter.ts index cf4a9d6..ff14b65 100644 --- a/src/codeHighlighter.ts +++ b/src/codeHighlighter.ts @@ -1,7 +1,7 @@ import json5 from 'json5'; import * as shiki from 'shiki'; -import type { IShikiTheme, Theme } from 'shiki-themes'; -import { Highlighter } from 'shiki/dist/highlighter'; +import { Highlighter } from 'shiki' +import type { Theme, IShikiTheme } from 'shiki' import * as vscode from 'vscode'; declare const TextDecoder: any; @@ -62,13 +62,10 @@ export class CodeHighlighter { const highlighter = await this._highlighter; return (code: string, inputLanguage: string): string => { - const language = inputLanguage || document.languageId; - if (language && highlighter) { + const languageId = inputLanguage || document.languageId; + if (languageId && highlighter) { try { - const languageId = getLanguageId(language); - if (languageId) { - return highlighter.codeToHtml!(code, languageId); - } + return highlighter.codeToHtml(code, { lang: languageId }); } catch (err) { // noop } @@ -92,7 +89,7 @@ export class CodeHighlighter { } else if (currentThemeName) { const colorThemePath = getCurrentThemePath(currentThemeName); if (colorThemePath) { - theme = shiki.loadTheme(colorThemePath.fsPath); + theme = await shiki.loadTheme(colorThemePath.fsPath); theme.name = 'random'; // Shiki doesn't work without name and defaults to `Nord` @@ -107,25 +104,18 @@ export class CodeHighlighter { } if (typeof theme === 'string') { - theme = shiki.getTheme(theme as any); + // @ts-ignore + theme = shiki.getTheme(theme) as IShikiTheme } - if (theme) { + if (theme && theme.colors) { theme.bg = ' '; // Don't set bg so that we use the view's background instead + theme.colors['editor.background'] = ' '; } return theme; } } -function getLanguageId(inId: string): string | undefined { - for (const language of languages) { - if (inId === language.name || language.identifiers.some(langId => inId === langId)) { - return language.language; - } - } - return undefined; -} - const defaultDarkForeground = '#cccccc'; const defaultLightForeground = '#333333'; @@ -156,66 +146,4 @@ async function getDefaultForeground(uri: vscode.Uri): Promise { return vscode.window.activeColorTheme.kind === vscode.ColorThemeKind.Light ? defaultLightForeground : defaultDarkForeground; -} - -// Taken from https://github.com/Microsoft/vscode-markdown-tm-grammar/blob/master/build.js -const languages = [ - { name: 'css', language: 'css', identifiers: ['css', 'css.erb'], source: 'source.css' }, - { name: 'basic', language: 'html', identifiers: ['html', 'htm', 'shtml', 'xhtml', 'inc', 'tmpl', 'tpl'], source: 'text.html.basic' }, - { name: 'ini', language: 'ini', identifiers: ['ini', 'conf'], source: 'source.ini' }, - { name: 'java', language: 'java', identifiers: ['java', 'bsh'], source: 'source.java' }, - { name: 'lua', language: 'lua', identifiers: ['lua'], source: 'source.lua' }, - { name: 'makefile', language: 'makefile', identifiers: ['Makefile', 'makefile', 'GNUmakefile', 'OCamlMakefile'], source: 'source.makefile' }, - { name: 'perl', language: 'perl', identifiers: ['perl', 'pl', 'pm', 'pod', 't', 'PL', 'psgi', 'vcl'], source: 'source.perl' }, - { name: 'r', language: 'r', identifiers: ['R', 'r', 's', 'S', 'Rprofile'], source: 'source.r' }, - { name: 'ruby', language: 'ruby', identifiers: ['ruby', 'rb', 'rbx', 'rjs', 'Rakefile', 'rake', 'cgi', 'fcgi', 'gemspec', 'irbrc', 'Capfile', 'ru', 'prawn', 'Cheffile', 'Gemfile', 'Guardfile', 'Hobofile', 'Vagrantfile', 'Appraisals', 'Rantfile', 'Berksfile', 'Berksfile.lock', 'Thorfile', 'Puppetfile'], source: 'source.ruby' }, - // Left to its own devices, the PHP grammar will match HTML as a combination of operators - // and constants. Therefore, HTML must take precedence over PHP in order to get proper - // syntax highlighting. - { name: 'php', language: 'php', identifiers: ['php', 'php3', 'php4', 'php5', 'phpt', 'phtml', 'aw', 'ctp'], source: ['text.html.basic', 'text.html.php', 'source.php'] }, - { name: 'sql', language: 'sql', identifiers: ['sql', 'ddl', 'dml'], source: 'source.sql' }, - { name: 'vs_net', language: 'vs_net', identifiers: ['vb'], source: 'source.asp.vb.net' }, - { name: 'xml', language: 'xml', identifiers: ['xml', 'xsd', 'tld', 'jsp', 'pt', 'cpt', 'dtml', 'rss', 'opml'], source: 'text.xml' }, - { name: 'xsl', language: 'xsl', identifiers: ['xsl', 'xslt'], source: 'text.xml.xsl' }, - { name: 'yaml', language: 'yaml', identifiers: ['yaml', 'yml'], source: 'source.yaml' }, - { name: 'dosbatch', language: 'dosbatch', identifiers: ['bat', 'batch'], source: 'source.batchfile' }, - { name: 'clojure', language: 'clojure', identifiers: ['clj', 'cljs', 'clojure'], source: 'source.clojure' }, - { name: 'coffee', language: 'coffee', identifiers: ['coffee', 'Cakefile', 'coffee.erb'], source: 'source.coffee' }, - { name: 'c', language: 'c', identifiers: ['c', 'h'], source: 'source.c' }, - { name: 'cpp', language: 'cpp', identifiers: ['cpp', 'c\\+\\+', 'cxx'], source: 'source.cpp' }, - { name: 'diff', language: 'diff', identifiers: ['patch', 'diff', 'rej'], source: 'source.diff' }, - { name: 'dockerfile', language: 'dockerfile', identifiers: ['dockerfile', 'Dockerfile'], source: 'source.dockerfile' }, - { name: 'git_commit', identifiers: ['COMMIT_EDITMSG', 'MERGE_MSG'], source: 'text.git-commit' }, - { name: 'git_rebase', identifiers: ['git-rebase-todo'], source: 'text.git-rebase' }, - { name: 'go', language: 'go', identifiers: ['go', 'golang'], source: 'source.go' }, - { name: 'groovy', language: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' }, - { name: 'pug', language: 'pug', identifiers: ['jade', 'pug'], source: 'text.pug' }, - - { name: 'js', language: 'javascript', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' }, - { name: 'js_regexp', identifiers: ['regexp'], source: 'source.js.regexp' }, - { name: 'json', language: 'json', identifiers: ['json', 'json5', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' }, - { name: 'jsonc', language: 'jsonc', identifiers: ['jsonc'], source: 'source.json.comments' }, - { name: 'less', language: 'less', identifiers: ['less'], source: 'source.css.less' }, - { name: 'objc', language: 'objc', identifiers: ['objectivec', 'objective-c', 'mm', 'objc', 'obj-c', 'm', 'h'], source: 'source.objc' }, - { name: 'swift', language: 'swift', identifiers: ['swift'], source: 'source.swift' }, - { name: 'scss', language: 'scss', identifiers: ['scss'], source: 'source.css.scss' }, - - { name: 'perl6', language: 'perl6', identifiers: ['perl6', 'p6', 'pl6', 'pm6', 'nqp'], source: 'source.perl.6' }, - { name: 'powershell', language: 'powershell', identifiers: ['powershell', 'ps1', 'psm1', 'psd1'], source: 'source.powershell' }, - { name: 'python', language: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi'], source: 'source.python' }, - { name: 'regexp_python', identifiers: ['re'], source: 'source.regexp.python' }, - { name: 'rust', language: 'rust', identifiers: ['rust', 'rs'], source: 'source.rust' }, - { name: 'scala', language: 'scala', identifiers: ['scala', 'sbt'], source: 'source.scala' }, - { name: 'shell', language: 'shellscript', identifiers: ['shell', 'sh', 'bash', 'zsh', 'bashrc', 'bash_profile', 'bash_login', 'profile', 'bash_logout', '.textmate_init'], source: 'source.shell' }, - { name: 'ts', language: 'typescript', identifiers: ['typescript', 'ts'], source: 'source.ts' }, - { name: 'tsx', language: 'typescriptreact', identifiers: ['tsx'], source: 'source.tsx' }, - { name: 'csharp', language: 'csharp', identifiers: ['cs', 'csharp', 'c#'], source: 'source.cs' }, - { name: 'fsharp', language: 'fsharp', identifiers: ['fs', 'fsharp', 'f#'], source: 'source.fsharp' }, - { name: 'dart', language: 'dart', identifiers: ['dart'], source: 'source.dart' }, - { name: 'handlebars', language: 'handlebars', identifiers: ['handlebars', 'hbs'], source: 'text.html.handlebars' }, - { name: 'markdown', language: 'markdown', identifiers: ['markdown', 'md'], source: 'text.html.markdown' }, - { name: 'haskell', language: 'haskell', identifiers: ['hs', 'lhs'], source: 'text.html.hs' }, - { name: 'ocaml', language: 'ocaml', identifiers: ['ml', 'mli', 'eliom', 'eliomi'], source: 'source.ocaml.interface' }, - { name: 'zig', language: 'zig', identifiers: ['zig'], source: 'source.zig' }, - { name: 'd', language: 'd', identifiers: ['d'], source: 'source.d' }, -]; +} \ No newline at end of file