Massive restructure of plugin API

This commit is contained in:
Zef Hemel
2022-10-14 15:11:33 +02:00
parent 982623fc38
commit 7d28b53b75
70 changed files with 826 additions and 969 deletions
+3 -4
View File
@@ -1,12 +1,11 @@
import { matchBefore } from "../../syscall/silverbullet-syscall/editor.ts";
import { listCommands } from "../../syscall/silverbullet-syscall/system.ts";
import { editor, system } from "$sb/silverbullet-syscall/mod.ts";
export async function commandComplete() {
let prefix = await matchBefore("\\{\\[[^\\]]*");
const prefix = await editor.matchBefore("\\{\\[[^\\]]*");
if (!prefix) {
return null;
}
let allCommands = await listCommands();
const allCommands = await system.listCommands();
return {
from: prefix.from + 2,