Skip to content

Commit 863c3b6

Browse files
committed
deps: upgrade @vim-fall/std to 0.4.0
1 parent 1cbd77f commit 863c3b6

File tree

3 files changed

+91
-14
lines changed

3 files changed

+91
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ The following is a minimum configuration example. It only defines several
8181
fundamental pickers as default configurations.
8282

8383
```typescript
84-
import { type Entrypoint } from "jsr:@vim-fall/std@^0.3.2";
85-
import * as builtin from "jsr:@vim-fall/std@^0.3.2/builtin";
84+
import { type Entrypoint } from "jsr:@vim-fall/std@^0.4.0";
85+
import * as builtin from "jsr:@vim-fall/std@^0.4.0/builtin";
8686

8787
export const main: Entrypoint = ({
8888
defineItemPickerFromSource,

denops/fall/_assets/default.config.ts

Lines changed: 87 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import {
33
type Entrypoint,
44
refineCurator,
55
refineSource,
6-
} from "jsr:@vim-fall/std@^0.3.2";
7-
import * as builtin from "jsr:@vim-fall/std@^0.3.2/builtin";
6+
} from "jsr:@vim-fall/std@^0.4.0";
7+
import * as builtin from "jsr:@vim-fall/std@^0.4.0/builtin";
8+
import { SEPARATOR } from "jsr:@std/path@^1.0.8/constants";
89

910
const myPathActions = {
1011
...builtin.action.defaultOpenActions,
@@ -26,6 +27,88 @@ const myMiscActions = {
2627
...builtin.action.defaultSubmatchActions,
2728
};
2829

30+
const myFilterFile = (path: string) => {
31+
const excludes = [
32+
".7z",
33+
".DS_Store",
34+
".avi",
35+
".avi",
36+
".bmp",
37+
".class",
38+
".dll",
39+
".dmg",
40+
".doc",
41+
".docx",
42+
".dylib",
43+
".ear",
44+
".exe",
45+
".fla",
46+
".flac",
47+
".flv",
48+
".gif",
49+
".ico",
50+
".id_ed25519",
51+
".id_rsa",
52+
".iso",
53+
".jar",
54+
".jpeg",
55+
".jpg",
56+
".key",
57+
".mkv",
58+
".mov",
59+
".mp3",
60+
".mp4",
61+
".mpeg",
62+
".mpg",
63+
".o",
64+
".obj",
65+
".ogg",
66+
".pdf",
67+
".png",
68+
".ppt",
69+
".pptx",
70+
".rar",
71+
".so",
72+
".swf",
73+
".tar.gz",
74+
".war",
75+
".wav",
76+
".webm",
77+
".wma",
78+
".wmv",
79+
".xls",
80+
".xlsx",
81+
".zip",
82+
];
83+
for (const exclude of excludes) {
84+
if (path.endsWith(exclude)) {
85+
return false;
86+
}
87+
}
88+
return true;
89+
};
90+
91+
const myFilterDirectory = (path: string) => {
92+
const excludes = [
93+
"$RECYVLE.BIN",
94+
".cache",
95+
".git",
96+
".hg",
97+
".ssh",
98+
".svn",
99+
"__pycache__", // Python
100+
"build", // C/C++
101+
"node_modules", // Node.js
102+
"target", // Rust
103+
];
104+
for (const exclude of excludes) {
105+
if (path.includes(`${SEPARATOR}${exclude}${SEPARATOR}`)) {
106+
return false;
107+
}
108+
}
109+
return true;
110+
};
111+
29112
export const main: Entrypoint = (
30113
{
31114
defineItemPickerFromSource,
@@ -77,14 +160,8 @@ export const main: Entrypoint = (
77160
"file",
78161
refineSource(
79162
builtin.source.file({
80-
excludes: [
81-
/.*\/node_modules\/.*/,
82-
/.*\/.git\/.*/,
83-
/.*\/.svn\/.*/,
84-
/.*\/.hg\/.*/,
85-
/.*\/.ssh\/.*/,
86-
/.*\/.DS_Store$/,
87-
],
163+
filterFile: myFilterFile,
164+
filterDirectory: myFilterDirectory,
88165
}),
89166
builtin.refiner.relativePath,
90167
),

denops/fall/_assets/minimum.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type Entrypoint } from "jsr:@vim-fall/std@^0.3.2";
2-
import * as builtin from "jsr:@vim-fall/std@^0.3.2/builtin";
1+
import { type Entrypoint } from "jsr:@vim-fall/std@^0.4.0";
2+
import * as builtin from "jsr:@vim-fall/std@^0.4.0/builtin";
33

44
export const main: Entrypoint = ({
55
defineItemPickerFromSource,

0 commit comments

Comments
 (0)