aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/src/keymap-upgrade
diff options
context:
space:
mode:
authorJoel Spadin <[email protected]>2024-10-26 02:55:09 -0500
committerGitHub <[email protected]>2024-10-26 09:55:09 +0200
commitf0a3947044e82df6778b293a78c07677df4b56e1 (patch)
tree9fb6a00cbd11848bc9ee7c598615b6b2facc0006 /docs/src/keymap-upgrade
parent7ee25c795934692df42b823f024bc846cf9c60b1 (diff)
downloadzmk-f0a3947044e82df6778b293a78c07677df4b56e1.tar.gz
zmk-f0a3947044e82df6778b293a78c07677df4b56e1.zip
Update web-tree-sitter and tweak keymap upgrader (#2593)
* fix(docs): Fix TypeScript import diagnostics Set the TypeScript module resolution mode to "bundler" so it correctly resolves imports in .ts files instead of showing errors in IDEs. * chore(docs): Update web-tree-sitter Updated web-tree-sitter, and switched from having a copy of tree-sitter-devicetree.wasm in the repo to using the latest version of the tree-sitter-devicetree module, which now contains the .wasm file. * fix(docs): Make keymap upgrader resize vertically only Changed the textarea in the keymap ugprader to allow only vertical resizing. This better fits the layout of the page, and it prevents you from shrinking the box horizontally to the point where it doesn't fit anything.
Diffstat (limited to 'docs/src/keymap-upgrade')
-rw-r--r--docs/src/keymap-upgrade/parser.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/src/keymap-upgrade/parser.ts b/docs/src/keymap-upgrade/parser.ts
index 52d6e98123..b496d1d5a8 100644
--- a/docs/src/keymap-upgrade/parser.ts
+++ b/docs/src/keymap-upgrade/parser.ts
@@ -5,6 +5,11 @@ const TREE_SITTER_WASM_URL = new URL(
import.meta.url
);
+const TREE_SITTER_DEVICETREE_WASM_URL = new URL(
+ "/node_modules/tree-sitter-devicetree/tree-sitter-devicetree.wasm",
+ import.meta.url
+);
+
export let Devicetree: Parser.Language;
export async function initParser() {
@@ -17,7 +22,7 @@ export async function initParser() {
return prefix + path;
},
});
- Devicetree = await Parser.Language.load("/tree-sitter-devicetree.wasm");
+ Devicetree = await Parser.Language.load(TREE_SITTER_DEVICETREE_WASM_URL.href);
}
export function createParser() {