We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ceb346 commit 36862c3Copy full SHA for 36862c3
denops/fall/extension/source/list.ts
@@ -0,0 +1,13 @@
1
+import type { Detail, IdItem } from "jsr:@vim-fall/core@^0.2.1/item";
2
+import type { Source } from "jsr:@vim-fall/core@^0.2.1/source";
3
+
4
+/**
5
+ * Create a source from a list
6
+ */
7
+export function list<T extends Detail>(items: readonly IdItem<T>[]): Source<T> {
8
+ return {
9
+ collect: async function* () {
10
+ yield* items;
11
+ },
12
+ };
13
+}
0 commit comments