This commit is contained in:
Olivier Gagnon 2021-10-14 23:11:31 -04:00
parent 4603216aa0
commit 7417ff8a10

@ -299,16 +299,12 @@ export async function determineAllPossibilitiesForTabCompletion(
const script = currServ.scripts.find((script) => script.filename === filename); const script = currServ.scripts.find((script) => script.filename === filename);
if (!script) return; // Doesn't exist. if (!script) return; // Doesn't exist.
// TODO compile if needs be. // TODO compile if needs be.
console.log("asd1");
if (!script.module) return; if (!script.module) return;
const loadedModule = await script.module; const loadedModule = await script.module;
console.log("asd2");
if (!loadedModule.autocomplete) return; // Doesn't have an autocomplete function. if (!loadedModule.autocomplete) return; // Doesn't have an autocomplete function.
console.log(loadedModule.autocomplete());
return loadedModule.autocomplete(); return loadedModule.autocomplete();
} }
const pos = await scriptAutocomplete(); const pos = await scriptAutocomplete();
console.log(pos);
if (pos) return pos; if (pos) return pos;
if (isCommand("run")) { if (isCommand("run")) {