Skip to content

Commit 7fce3b2

Browse files
committed
☕ Support multiple files in gen-function
1 parent a1d5be8 commit 7fce3b2

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

denops_std/function/vim/_generated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function balloon_split(
6767
return denops.call("balloon_split", ...args);
6868
}
6969

70-
/**/
70+
/** */
7171
export function buffer_exists(denops: Denops): Promise<unknown>;
7272
export function buffer_exists(
7373
denops: Denops,
@@ -98,7 +98,7 @@ export function buffer_number(
9898
return denops.call("buffer_number", ...args);
9999
}
100100

101-
/**/
101+
/** */
102102
export function last_buffer_nr(denops: Denops): Promise<unknown>;
103103
export function last_buffer_nr(
104104
denops: Denops,

scripts/gen-function/gen-function.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ const manualFnSet = new Set([
1919
...Object.keys(nvimManual),
2020
]);
2121

22-
const vimHelp = await downloadString(
22+
const vimHelps = await Promise.all([
2323
`https://raw.githubusercontent.com/vim/vim/v${VIM_VERSION}/runtime/doc/eval.txt`,
24-
);
25-
const vimDefs = parse(vimHelp);
24+
].map(downloadString));
25+
const vimDefs = vimHelps.map(parse).flat();
2626
const vimFnSet = difference(new Set(vimDefs.map((def) => def.fn)), manualFnSet);
2727

28-
const nvimHelp = await downloadString(
28+
const nvimHelps = await Promise.all([
2929
`https://raw.githubusercontent.com/neovim/neovim/v${NVIM_VERSION}/runtime/doc/eval.txt`,
30-
);
31-
const nvimHelp2 = await downloadString(
3230
`https://raw.githubusercontent.com/neovim/neovim/v${NVIM_VERSION}/runtime/doc/api.txt`,
33-
);
34-
const nvimDefs = parse(nvimHelp).concat(parse(nvimHelp2));
31+
].map(downloadString));
32+
const nvimDefs = nvimHelps.map(parse).flat();
3533
const nvimFnSet = difference(
3634
new Set(nvimDefs.map((def) => def.fn)),
3735
manualFnSet,

0 commit comments

Comments
 (0)