hey look a thing
This commit is contained in:
commit
dac0a80d47
12 changed files with 825 additions and 0 deletions
34
embeddedLanguages.mts
Normal file
34
embeddedLanguages.mts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import packageJSON from './base.package.json';
|
||||
|
||||
const languages: {
|
||||
id: string;
|
||||
sourceScope: string;
|
||||
aliases?: string[];
|
||||
}[] = [
|
||||
{id: 'javascript', sourceScope: 'source.js'},
|
||||
{id: 'typescript', sourceScope: 'source.ts'},
|
||||
{id: 'javascriptreact', sourceScope: 'source.js.jsx'},
|
||||
{id: 'typescriptreact', sourceScope: 'source.tsx'},
|
||||
{id: 'json', sourceScope: 'source.json'},
|
||||
{id: 'jsonc', sourceScope: 'source.json.comments'},
|
||||
{id: 'jsonl', sourceScope: 'source.json.lines'},
|
||||
{id: 'shellscript', sourceScope: 'source.shell'},
|
||||
{id: 'rust', sourceScope: 'source.rust'},
|
||||
{id: 'css', sourceScope: 'source.css'},
|
||||
{id: 'scss', sourceScope: 'source.css.scss'},
|
||||
{id: 'less', sourceScope: 'source.css.less'},
|
||||
{id: 'html', sourceScope: 'text.html.derivative'},
|
||||
{id: 'sql', sourceScope: 'source.sql'},
|
||||
{id: 'markdown', sourceScope: 'text.html.markdown'},
|
||||
{id: 'xml', sourceScope: 'text.xml'},
|
||||
{id: 'yaml', sourceScope: 'source.yaml'},
|
||||
];
|
||||
|
||||
export default languages.map(language => ({
|
||||
id: language.id,
|
||||
tags: [language.id, ...(language.aliases ?? [])],
|
||||
sourceScope: language.sourceScope,
|
||||
embedScopeInline: `meta.embedded.inline.${language.id}`,
|
||||
embedScopeBlock: `meta.embedded.block.${language.id}`,
|
||||
injectionScope: `${packageJSON.name}.injection.${language.id}`,
|
||||
}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue