Skip to content

Commit ab41b6a

Browse files
committed
Use denops_core module instead
1 parent bedb412 commit ab41b6a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

deps.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
export type {
22
Context,
33
Dispatcher,
4-
} from "https://deno.land/x/denops@v0.10/mod.ts";
5-
export {
6-
Denops,
7-
getCacheOrElse,
8-
} from "https://deno.land/x/denops@v0.10/mod.ts";
4+
} from "https://deno.land/x/denops_core@v0.10.0/mod.ts";
5+
export { Denops } from "https://deno.land/x/denops_core@v0.10.0/mod.ts";

vim/vim.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { Context, Denops, Dispatcher, getCacheOrElse } from "../deps.ts";
1+
import { Context, Denops, Dispatcher } from "../deps.ts";
22
import { execute } from "./execute.ts";
33
import { autocmd, AutocmdHelper } from "./autocmd.ts";
44
import { VariableHelper } from "./variable.ts";
55

66
export class Vim {
7+
static instance?: Vim;
8+
79
#denops: Denops;
810

911
readonly g: VariableHelper;
@@ -22,9 +24,10 @@ export class Vim {
2224
}
2325

2426
static get(): Vim {
25-
return getCacheOrElse("vim", () => {
26-
return new Vim(Denops.get());
27-
});
27+
if (!Vim.instance) {
28+
Vim.instance = new Vim(Denops.get());
29+
}
30+
return Vim.instance;
2831
}
2932

3033
get name(): string {

0 commit comments

Comments
 (0)