3
3
composeRenderers ,
4
4
refineCurator ,
5
5
refineSource ,
6
- } from "jsr:@vim-fall/std@^0.7.1 " ;
7
- import * as builtin from "jsr:@vim-fall/std@^0.7.1 /builtin" ;
6
+ } from "jsr:@vim-fall/std@^0.7.4 " ;
7
+ import * as builtin from "jsr:@vim-fall/std@^0.7.4 /builtin" ;
8
8
import { SEPARATOR } from "jsr:@std/path@^1.0.8/constants" ;
9
9
10
10
// NOTE:
@@ -22,7 +22,6 @@ const myPathActions = {
22
22
23
23
const myQuickfixActions = {
24
24
...builtin . action . defaultQuickfixActions ,
25
- // Install https://github.com/thinca/vim-qfreplace to use this action
26
25
"quickfix:qfreplace" : builtin . action . quickfix ( {
27
26
after : "Qfreplace" ,
28
27
} ) ,
@@ -128,6 +127,32 @@ export const main: Entrypoint = (
128
127
theme : builtin . theme . MODERN_THEME ,
129
128
} ) ;
130
129
130
+ defineItemPickerFromCurator (
131
+ "grep" ,
132
+ refineCurator (
133
+ builtin . curator . grep ,
134
+ builtin . refiner . relativePath ,
135
+ ) ,
136
+ {
137
+ sorters : [
138
+ builtin . sorter . noop ,
139
+ builtin . sorter . lexical ,
140
+ builtin . sorter . lexical ( { reverse : true } ) ,
141
+ ] ,
142
+ renderers : [
143
+ builtin . renderer . nerdfont ,
144
+ builtin . renderer . noop ,
145
+ ] ,
146
+ previewers : [ builtin . previewer . file ] ,
147
+ actions : {
148
+ ...myPathActions ,
149
+ ...myQuickfixActions ,
150
+ ...myMiscActions ,
151
+ } ,
152
+ defaultAction : "open" ,
153
+ } ,
154
+ ) ;
155
+
131
156
defineItemPickerFromCurator (
132
157
"git-grep" ,
133
158
refineCurator (
@@ -292,4 +317,58 @@ export const main: Entrypoint = (
292
317
} ,
293
318
defaultAction : "help" ,
294
319
} ) ;
320
+
321
+ defineItemPickerFromSource ( "quickfix" , builtin . source . quickfix , {
322
+ matchers : [ builtin . matcher . fzf ] ,
323
+ sorters : [
324
+ builtin . sorter . noop ,
325
+ builtin . sorter . lexical ,
326
+ builtin . sorter . lexical ( { reverse : true } ) ,
327
+ ] ,
328
+ previewers : [ builtin . previewer . buffer ] ,
329
+ actions : {
330
+ ...builtin . action . defaultOpenActions ,
331
+ ...myMiscActions ,
332
+ } ,
333
+ defaultAction : "open" ,
334
+ } ) ;
335
+
336
+ defineItemPickerFromSource (
337
+ "oldfiles" ,
338
+ refineSource (
339
+ builtin . source . oldfiles ,
340
+ builtin . refiner . cwd ,
341
+ builtin . refiner . exists ,
342
+ builtin . refiner . relativePath ,
343
+ ) ,
344
+ {
345
+ matchers : [ builtin . matcher . fzf ] ,
346
+ sorters : [
347
+ builtin . sorter . noop ,
348
+ builtin . sorter . lexical ,
349
+ builtin . sorter . lexical ( { reverse : true } ) ,
350
+ ] ,
351
+ previewers : [ builtin . previewer . file ] ,
352
+ actions : {
353
+ ...myPathActions ,
354
+ ...myQuickfixActions ,
355
+ ...myMiscActions ,
356
+ } ,
357
+ defaultAction : "open" ,
358
+ } ,
359
+ ) ;
360
+
361
+ defineItemPickerFromSource ( "history" , builtin . source . history , {
362
+ matchers : [ builtin . matcher . fzf ] ,
363
+ sorters : [
364
+ builtin . sorter . noop ,
365
+ builtin . sorter . lexical ,
366
+ builtin . sorter . lexical ( { reverse : true } ) ,
367
+ ] ,
368
+ actions : {
369
+ "cmd" : builtin . action . cmd ( { immediate : true } ) ,
370
+ ...myMiscActions ,
371
+ } ,
372
+ defaultAction : "cmd" ,
373
+ } ) ;
295
374
} ;
0 commit comments