Skip to content

Commit 621ab58

Browse files
committed
feat: remove config and use @vim-fall/config instead
1 parent 2054388 commit 621ab58

File tree

13 files changed

+23
-224
lines changed

13 files changed

+23
-224
lines changed

action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ export type * from "@vim-fall/core/action";
22

33
import type { Denops } from "@denops/std";
44
import type { Action, InvokeParams } from "@vim-fall/core/action";
5+
import { type DerivableArray, deriveArray } from "@vim-fall/config/derivable";
56

67
import type { Detail, DetailUnit } from "./item.ts";
78
import type { Promish } from "./util/_typeutil.ts";
8-
import { type DerivableArray, deriveArray } from "./util/derivable.ts";
99

1010
/**
1111
* Defines an action.

builtin/action/submatch.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,28 @@ import type {
99
Sorter,
1010
Theme,
1111
} from "@vim-fall/core";
12-
13-
import type { Actions, GlobalConfig, ItemPickerParams } from "../../config.ts";
14-
import { type Action, defineAction } from "../../action.ts";
12+
import type { GlobalConfig } from "@vim-fall/config/global-config";
13+
import type { ItemPickerParams } from "@vim-fall/config/item-picker";
1514
import {
1615
type Derivable,
1716
type DerivableArray,
1817
type DerivableMap,
1918
derive,
2019
deriveArray,
2120
deriveMap,
22-
} from "../../util/derivable.ts";
21+
} from "@vim-fall/config/derivable";
22+
23+
import { type Action, defineAction } from "../../action.ts";
2324
import { list } from "../source/list.ts";
2425
import { fzf } from "../matcher/fzf.ts";
2526
import { substring } from "../matcher/substring.ts";
2627
import { regexp } from "../matcher/regexp.ts";
2728

29+
type Actions<T extends Detail, A extends string> = ItemPickerParams<
30+
T,
31+
A
32+
>["actions"];
33+
2834
export type SubmatchOptions<T extends Detail, A extends string> = {
2935
/**
3036
* Actions available for the submatch picker.

config.ts

Lines changed: 0 additions & 146 deletions
This file was deleted.

curator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ export type * from "@vim-fall/core/curator";
22

33
import type { Denops } from "@denops/std";
44
import type { CurateParams, Curator } from "@vim-fall/core/curator";
5+
import { type DerivableArray, deriveArray } from "@vim-fall/config/derivable";
56

67
import type { Detail, IdItem } from "./item.ts";
7-
import { type DerivableArray, deriveArray } from "./util/derivable.ts";
88

99
/**
1010
* Defines a curator responsible for collecting and filtering items.

deno.jsonc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"./builtin/theme/double": "./builtin/theme/double.ts",
6767
"./builtin/theme/modern": "./builtin/theme/modern.ts",
6868
"./builtin/theme/single": "./builtin/theme/single.ts",
69-
"./config": "./config.ts",
7069
"./coordinator": "./coordinator.ts",
7170
"./curator": "./curator.ts",
7271
"./item": "./item.ts",
@@ -77,7 +76,6 @@
7776
"./sorter": "./sorter.ts",
7877
"./source": "./source.ts",
7978
"./theme": "./theme.ts",
80-
"./util/derivable": "./util/derivable.ts",
8179
"./util/stringutil": "./util/stringutil.ts",
8280
"./util/testutil": "./util/testutil.ts"
8381
},
@@ -122,6 +120,7 @@
122120
"@std/path": "jsr:@std/path@^1.0.8",
123121
"@std/streams": "jsr:@std/streams@^1.0.8",
124122
"@std/testing": "jsr:@std/testing@^1.0.4",
123+
"@vim-fall/config": "jsr:@vim-fall/config@^0.17.3",
125124
"@vim-fall/core": "jsr:@vim-fall/core@^0.2.1",
126125
"fzf": "npm:fzf@^0.5.2"
127126
}

matcher.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ export type * from "@vim-fall/core/matcher";
33
import type { Denops } from "@denops/std";
44
import type { Detail, DetailUnit, IdItem } from "@vim-fall/core/item";
55
import type { Matcher, MatchParams } from "@vim-fall/core/matcher";
6-
7-
import { type DerivableArray, deriveArray } from "./util/derivable.ts";
6+
import { type DerivableArray, deriveArray } from "@vim-fall/config/derivable";
87

98
/**
109
* Defines a matcher that filters items based on a query.

mod.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./action.ts";
2-
export * from "./config.ts";
32
export * from "./coordinator.ts";
43
export * from "./curator.ts";
54
export * from "./item.ts";

previewer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ export type * from "@vim-fall/core/previewer";
22

33
import type { Denops } from "@denops/std";
44
import type { Previewer, PreviewParams } from "@vim-fall/core/previewer";
5+
import { type DerivableArray, deriveArray } from "@vim-fall/config/derivable";
56

67
import type { Detail, DetailUnit, PreviewItem } from "./item.ts";
78
import type { Promish } from "./util/_typeutil.ts";
8-
import { type DerivableArray, deriveArray } from "./util/derivable.ts";
99

1010
/**
1111
* Defines a previewer for displaying item previews.

refiner.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ import type { Denops } from "@denops/std";
44

55
import type { IdItem } from "@vim-fall/core/item";
66
import type { RefineParams, Refiner } from "@vim-fall/core/refiner";
7+
import {
8+
type Derivable,
9+
derive,
10+
deriveArray,
11+
} from "@vim-fall/config/derivable";
712

813
import type { FlatType } from "./util/_typeutil.ts";
914
import type { Detail, DetailUnit } from "./item.ts";
1015
import { defineSource, type Source } from "./source.ts";
1116
import { type Curator, defineCurator } from "./curator.ts";
12-
import { type Derivable, derive, deriveArray } from "./util/derivable.ts";
1317

1418
type Refine<T extends Detail, U extends Detail> = (
1519
denops: Denops,

renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ export type * from "@vim-fall/core/renderer";
22

33
import type { Denops } from "@denops/std";
44
import type { Renderer, RenderParams } from "@vim-fall/core/renderer";
5+
import { type DerivableArray, deriveArray } from "@vim-fall/config/derivable";
56

67
import type { Detail, DetailUnit } from "./item.ts";
7-
import { type DerivableArray, deriveArray } from "./util/derivable.ts";
88

99
/**
1010
* Defines a renderer for rendering items in a specific way.

0 commit comments

Comments
 (0)