Improvements to playground editor

This commit is contained in:
2025-06-27 21:31:35 -07:00
parent 5743eb39ea
commit cee1519b8e
7 changed files with 74 additions and 19 deletions

View File

@@ -185,6 +185,7 @@ const language: EditorDelegate = {
return topData?.context.find((entry) => entry.name === word);
},
onChange(value) {
// run via the linter now
// clearTimeout(timeout);
// timeout = setTimeout(() => {
// run(value);
@@ -199,15 +200,17 @@ const language: EditorDelegate = {
async lint(view) {
console.log("LINT");
let src = view.state.doc.toString();
localStorage.code = src
// we'll want to pull it from the file.
const fileName = state.currentFile.value;
console.log("FN", fileName);
// console.log("SRC", src);
try {
let out = await runCommand({
id: nextID(),
type: "compileRequest",
fileName,
src,
compile: false,
});
console.log("OUT", out);
let markers = processOutput(out);