-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsession.ts
More file actions
23 lines (22 loc) · 627 Bytes
/
session.ts
File metadata and controls
23 lines (22 loc) · 627 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { Denops } from "@denops/std";
import type { Renderer } from "@vim-fall/core/renderer";
import type { DisplayItem } from "@vim-fall/core/item";
import type { Detail } from "../source/session.ts";
export function session(): Renderer<Detail> {
return {
render(
_denops: Denops,
{ items }: { items: DisplayItem<Detail>[] },
{ signal }: { signal?: AbortSignal },
): void {
for (const item of items) {
if (signal?.aborted) break;
item.label = [
item.value,
item.detail.name,
...item.detail.args,
].join(" ");
}
},
};
}