Skip to content

Instantly share code, notes, and snippets.

@4513ECHO
Created December 13, 2022 07:26
Show Gist options
  • Save 4513ECHO/adbcb743e482920023406b8b4c28e11a to your computer and use it in GitHub Desktop.
Save 4513ECHO/adbcb743e482920023406b8b4c28e11a to your computer and use it in GitHub Desktop.
import type { Denops } from "https://deno.land/x/denops_std@v3.11.3/mod.ts";
import { batch } from "https://deno.land/x/denops_std@v3.11.3/batch/mod.ts";
import { modifiable } from "https://deno.land/x/denops_std@v3.11.3/buffer/mod.ts";
export function main(denops: Denops): void {
denops.dispatcher = {
async modifiableTest(): Promise<void> {
await batch(denops, async (denops) => {
await modifiable(
denops,
await denops.call("bufnr") as number,
() => Promise.resolve(),
);
});
},
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment