Skip to content

Commit

Permalink
Add getExt() and getProtocols()
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Aug 8, 2024
1 parent 0ae5468 commit 584251d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
31 changes: 30 additions & 1 deletion denops/dpp/dpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ import {
} from "./deps.ts";
import type {
ActionName,
BaseExt,
BaseExtParams,
Context,
DppOptions,
ExtName,
ExtOptions,
Plugin,
Protocol,
ProtocolName,
} from "./types.ts";
import type { Loader } from "./loader.ts";
import type { ConfigReturn } from "./base/config.ts";
import { extAction, getProtocols } from "./ext.ts";
import { extAction, getExt, getProtocols } from "./ext.ts";
import {
convert2List,
isDirectory,
Expand Down Expand Up @@ -55,6 +58,32 @@ export class Dpp {
);
}

async getExt(
denops: Denops,
options: DppOptions,
extName: ExtName,
): Promise<
[
BaseExt<BaseExtParams> | undefined,
ExtOptions,
BaseExtParams,
]
> {
return await getExt(
denops,
this.#loader,
options,
extName,
);
}

async getProtocols(
denops: Denops,
options: DppOptions,
): Promise<Record<ProtocolName, Protocol>> {
return await getProtocols(denops, this.#loader, options);
}

async makeState(
denops: Denops,
options: DppOptions,
Expand Down
2 changes: 1 addition & 1 deletion denops/dpp/ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function extAction(
return ret;
}

async function getExt(
export async function getExt(
denops: Denops,
loader: Loader,
options: DppOptions,
Expand Down

0 comments on commit 584251d

Please sign in to comment.