Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nvlang committed Jun 26, 2024
1 parent d53e45f commit 0311688
Show file tree
Hide file tree
Showing 4 changed files with 410 additions and 1,697 deletions.
8 changes: 5 additions & 3 deletions extras/vscode-extension/sveltex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"categories": [
"Programming Languages"
],
"scripts": {
"build": "tsx scripts/build.ts"
},
"contributes": {
"languages": [
{
Expand All @@ -30,9 +33,8 @@
"path": "./syntaxes/sveltex.tmLanguage.json",
"embeddedLanguages": {
"source.svelte": "svelte",
"source.js": "javascript",
"text.html.markdown": "markdown",
"meta.tag.svelte": "svelte"
"text.html.markdown": "svelte",
"text.tex.latex": "latex"
}
}
]
Expand Down
16 changes: 16 additions & 0 deletions extras/vscode-extension/sveltex/scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { readFileSync, writeFileSync } from 'fs';
import { load } from 'js-yaml';

// this code if you want to save
writeFileSync(
'syntaxes/sveltex.tmLanguage.json',
JSON.stringify(
load(
readFileSync('syntaxes/sveltex.tmLanguage.yaml', {
encoding: 'utf-8',
}),
),
null,
2,
),
);
Loading

0 comments on commit 0311688

Please sign in to comment.