forked from Shougo/ddu.vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ddu.txt
1515 lines (1102 loc) · 48.1 KB
/
ddu.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*ddu.txt* Dark deno-powered UI framework for neovim/Vim
Author: Shougo <Shougo.Matsu at gmail.com>
License: MIT license
CONTENTS *ddu-contents*
Introduction |ddu-introduction|
Install |ddu-install|
Interface |ddu-interface|
Options |ddu-options|
Functions |ddu-functions|
Custom Functions |ddu-custom-functions|
UI Functions |ddu-ui-functions|
Examples |ddu-examples|
UIs |ddu-uis|
UI option |ddu-ui-options|
UI params |ddu-ui-params|
Sources |ddu-sources|
Source option |ddu-source-options|
Source params |ddu-source-params|
Filters |ddu-filters|
Filter options |ddu-filter-options|
Filter params |ddu-filter-params|
Columns |ddu-columns|
Column options |ddu-column-options|
Column params |ddu-column-params|
Kinds |ddu-kinds|
Kind options |ddu-kind-options|
Kind params |ddu-kind-params|
Actions |ddu-actions|
Action options |ddu-action-options|
Action params |ddu-action-params|
Action flags |ddu-action-flags|
Types |ddu-types|
Create UI |ddu-create-ui|
UI attributes |ddu-ui-attributes|
Create source |ddu-create-source|
Source attributes |ddu-source-attributes|
Item attributes |ddu-item-attributes|
Create filter |ddu-create-filter|
filter attributes |ddu-filter-attributes|
Create column |ddu-create-column|
column attributes |ddu-column-attributes|
Create kind |ddu-create-kind|
kind attributes |ddu-kind-attributes|
Previewer |ddu-previewer|
previewer attributes |ddu-previewer-attributes|
FAQ |ddu-faq|
Compatibility |ddu-compatibility|
==============================================================================
INTRODUCTION *ddu-introduction*
*ddu* is the abbreviation of "dark deno-powered UI". It provides an
asynchronous fuzzy finder UI.
If you don't want to configure plugins, you don't have to use the plugin.
It does not work with zero configuration. You can use other plugins.
==============================================================================
INSTALL *ddu-install*
NOTE: ddu.vim requires Neovim (0.8.0+) or Vim 9.0.1276+ (latest is
recommended).
Please install both Deno and "denops.vim".
https://deno.land/
https://github.com/vim-denops/denops.vim
NOTE: ddu.vim does not include any UIs, sources, filters and kinds.
You must install them you want manually.
You can search ddu.vim plugins from https://github.com/topics/ddu-vim.
==============================================================================
INTERFACE *ddu-interface*
------------------------------------------------------------------------------
OPTIONS *ddu-options*
There're 4 layers of options for the ddu.vim in order of priority:
user: set by |ddu#start()| or |ddu#get_items()|.
local: set by |ddu#custom#patch_local()| with a name.
global: set by |ddu#custom#patch_global()|.
default: as described in each |ddu-options|.
ddu.vim merges them recursively.
The |ddu-option-name| describes the name which local option be used.
And |ddu-option-name| value is also decided by user, global and
default options.
*ddu-option-actionOptions*
actionOptions (dictionary)
It is a dictionary that maps action names to its options.
See also |ddu-action-options|.
Default: {}
*ddu-option-actionParams*
actionParams (dictionary)
It is a dictionary that maps action names to its parameters.
See also |ddu-action-params|.
Default: {}
*ddu-option-columnOptions*
columnOptions (dictionary)
It is a dictionary that maps column names to its options.
See also |ddu-column-options|.
Default: {}
*ddu-option-columnParams*
columnParams (dictionary)
It is a dictionary that maps column names to its parameters.
See also |ddu-column-params|.
Default: {}
*ddu-option-expandInput*
expandInput (boolean)
Expand user input by |expand()|.
It is useful for file path sources.
*ddu-option-filterOptions*
filterOptions (dictionary)
It is a dictionary that maps filter names to its options.
See also |ddu-filter-options|.
Default: {}
*ddu-option-filterParams*
filterParams (dictionary)
It is a dictionary that maps filter names to its parameters.
See also |ddu-filter-params|.
Default: {}
*ddu-option-input*
input (string)
Specify an initial narrowing text.
NOTE: If the input contains spaces, it means AND search.
Default: ""
*ddu-option-name*
name (string)
Specify the name.
Default: "default"
*ddu-option-postFilters*
postFilters (string[] | dictionary[])
It is a list of registered filter names. It is called after
the items are filtered.
It is useful if you want to sort items regardless source
orders.
Default: []
*ddu-option-profile*
profile (boolean)
Print profile result.
NOTE: It is for debug.
*ddu-option-push*
push (boolean)
Save |ddu-option-name|'s ddu state and create new ddu state.
NOTE: The state can be restored by |ddu#pop()|.
*ddu-option-refresh*
refresh (boolean)
Refresh the items when |ddu-option-resume|.
Default: v:false
*ddu-option-resume*
resume (boolean)
Reuse the previous state. If none exist, a new ddu
state is created.
NOTE: Uses |ddu-option-name| to search for previous state.
Default: v:false
*ddu-option-searchPath*
searchPath (string | string[])
Search the path. This only works when specified |ddu#start()|
or |ddu#redraw()|.
NOTE: You can represents a path by two way like below.
"/aa/bb/cc" (string)
["/", "aa", "bb", "cc"] (string[])
NOTE: The path must be absolute path.
Default: ""
*ddu-option-sourceOptions*
sourceOptions (dictionary)
It is a dictionary that maps source names to its options. The
options with the name "_" is used as the options for all
sources.
See also |ddu-source-options|.
Default: {}
*ddu-option-sourceParams*
sourceParams (dictionary)
It is a dictionary that maps source names to its parameters.
See also |ddu-source-params|.
Default: {}
*ddu-option-sources*
sources (string[] | dictionary[])
It is a list of registered source names or elements which are
formatted as:
>
#{
name: {source-name},
options: {source-options},
params: {source-params},
}
<
Items from sources with smaller indexes will have smaller
indexes.
Default: []
*ddu-option-sync*
sync (boolean)
Redraw the UI when all sources are finished.
It is useful for multiple sources.
Default: v:false
*ddu-option-ui*
ui (string | dictionary)
Specify UI name or elements which are formatted as:
>
#{
name: {ui-name},
options: {ui-options},
params: {ui-params},
}
<
If it is empty string, it is ignored.
NOTE: You must set the option in the first.
Default: ""
*ddu-option-uiOptions*
uiOptions (dictionary)
It is a dictionary that maps UI names to its options. The
options with the name "_" is used as the options for all
UIs.
See also |ddu-ui-options|.
Default: {}
*ddu-option-uiParams*
uiParams (dictionary)
It is a dictionary that maps UI names to its parameters.
See also |ddu-ui-params|.
Default: {}
*ddu-option-unique*
unique (boolean)
Unique the items by |ddu-item-attribute-word| attribute.
Default: v:false
------------------------------------------------------------------------------
FUNCTIONS *ddu-functions*
*ddu#event()*
ddu#event({name}, {event})
Call the ddu event handler.
{name} is specified ddu name(|ddu-option-name|).
{event} is the event name string.
"cancel": After cancel the UI
"close": After close the UI
*ddu#get_context()*
ddu#get_context({name})
Get the context information.
{name} is specified ddu name(|ddu-option-name|).
*ddu#get_items()*
ddu#get_items([{options}])
Creates a new Ddu and get items without UI.
NOTE: You cannot call it in |vim_starting|. Because
denops.vim is not initialized.
NOTE: It blocks Vim/neovim UI.
Refer to |ddu-options| about {options}. If you skip a value,
it uses the default value.
*ddu#get_item_actions()*
ddu#get_item_actions({name}, {items})
Get the {name} actions for {items}.
NOTE: You cannot mix multiple kinds/sources.
*ddu#item_action()*
ddu#item_action({name}, {action}, {items}, {params})
Do the {action} action for {items}.
NOTE: You cannot mix multiple kinds/sources.
{name} is specified ddu name(|ddu-option-name|).
{items} can be empty.
{params} is action params.
NOTE: It is for creating UI interface.
*ddu#load()*
ddu#load({type}, {names})
Load ddu extensions.
{type} is "ui" or "source" or "filter" or "kind" or "column".
{names} is array of extension name.
*ddu#pop()*
ddu#pop({name}[, {opt}])
Restore the previous state.
{name} is specified ddu name(|ddu-option-name|).
{opt} is the options. The options below are available:
quit (boolean)
If it is true, does not open previous ddu.
sync (boolean)
If it is true, ddu is blocked until the acton is done.
If the state is empty, "quit" the current ddu.
NOTE: The previous state is saved by |ddu-option-push|.
*ddu#redraw()*
ddu#redraw({name}[, {opt}])
Redraw the UI.
{name} is specified ddu name(|ddu-option-name|).
{opt} is the options. The options below are available:
check (boolean)
If it is true, check the items are updated.
input (string)
Specify narrowing text.
refreshItems (boolean)
If it is true, refresh current items.
updateOptions (dictionary)
Overwrites options. Refer to |ddu-options| about options.
*ddu#redraw_tree()*
ddu#redraw_tree({name}, {mode}, {items})
Redraw the tree item.
{name} is specified ddu name(|ddu-option-name|).
{mode} is the mode string:
"collapse": Collapse the tree item
"expand": Expand the tree item
"recursive": Expand the tree item recursively
{items} is target tree items.
*ddu#register()*
ddu#register({type}, {path})
Register ddu extension.
{type} is "ui" or "source" or "filter" or "kind" or "column".
{path} is ddc extension path.
NOTE: {path} must be full path.
*ddu#start()*
ddu#start([{options}])
Creates a new Ddu.
NOTE: You cannot call it in |vim_starting|. Because
denops.vim is not initialized.
Refer to |ddu-options| about {options}. If you skip a value,
it uses the default value.
*ddu#ui_async_action()*
ddu#ui_async_action({name}, {action}[, {params}])
Do the {action} action in current UI asynchronously.
{name} is specified ddu name(|ddu-option-name|).
{params} is action params.
*ddu#ui_sync_action()*
ddu#ui_sync_action({name}, {action}[, {params}])
Do the {action} action in current UI synchronously.
{name} is specified ddu name(|ddu-option-name|).
{params} is action params.
CUSTOM FUNCTIONS *ddu-custom-functions*
*ddu#custom#action()*
ddu#custom#action({type}, {name}, {action-name}, {func})
Define {action-name} action for {name}.
{type} must be "ui" or "source" or "kind".
{name} is {type}'s name.
{func} must be a |Funcref| or the name of a function.
Note: It overwrites |ddu-ui-option-actions| or
|ddu-source-option-actions| or |ddu-kind-option-actions|.
Note: The function must return |ddu-action-flags| as |Number|.
|String| is ignored.
>
call ddu#custom#action('ui', 'ff', 'test3',
\ { args -> execute('let g:baz = 1') })
call ddu#custom#action('source', 'file_old', 'test2',
\ { args -> execute('let g:bar = 1') })
call ddu#custom#action('kind', 'file', 'test',
\ { args -> execute('let g:foo = 1') })
<
*ddu#custom#alias()*
ddu#custom#alias({type}, {alias-name}, {base-name})
Define {alias-name} alias based on {base-name}.
{type} must be "ui" or "source" or "filter" or "kind" or
"column" or "action".
NOTE: It must be called before sources/filters initialization.
>
call ddu#custom#alias('source', 'foo', 'file')
call ddu#custom#patch_global('sourceOptions', #{
\ file: #{ mark: 'A' },
\ foo: #{ mark: 'foo' },
\ })
<
*ddu#custom#get_alias_names()*
ddu#custom#get_alias_names({alias-type})
Get names of {alias-type} aliases as |List|.
*ddu#custom#get_current()*
ddu#custom#get_current({name})
Get current ddu options for {name}.
{name} is specified by |ddu-option-name|.
*ddu#custom#get_default_options()*
ddu#custom#get_default_options()
Get the default options.
*ddu#custom#get_global()*
ddu#custom#get_global()
Get global options.
*ddu#custom#get_local()*
ddu#custom#get_local()
Get current buffer specific options.
*ddu#custom#get_source_names()*
ddu#custom#get_source_names()
Get loaded source names as |List|.
*ddu#custom#load_config()*
ddu#custom#load_config({path})
Load TypeScript configuration from {path} file.
NOTE: {path} must be full path.
NOTE: The loading is asynchronous.
*ddu#custom#patch_global()*
ddu#custom#patch_global({option-name}, {value})
ddu#custom#patch_global({dict})
Set {option-name} option to {value}.
If {dict} is available, the key is {option-name} and the value
is {value}. See |ddu-options| for available {option-name}.
*ddu#custom#patch_local()*
ddu#custom#patch_local({ddu-name}, {option-name}, {value})
ddu#custom#patch_local({ddu-name}, {dict})
Set local options for specific |ddu-option-name|.
The arguments are the same as for |ddu#custom#patch_global()|.
UI FUNCTIONS *ddu-ui-functions*
*ddu#ui#async_action()*
ddu#ui#async_action({action-name}[, {params}])
Fire {action-name} action with {params} from current buffer
UI asynchronously.
{args} behavior depends on {action-name}.
NOTE: The action may be does not work because of asynchronous
execution. If so, you should use |ddu#ui#sync_action()|
instead.
*ddu#ui#do_action()*
ddu#ui#do_action({action-name}[, {params}])
It is same with |ddu#ui#sync_action()|.
*ddu#ui#get_item()*
ddu#ui#get_item()
Return the current cursor item as |Dictionary| from current
buffer UI.
NOTE: current UI must support "getItem" action.
*ddu#ui#get_items()*
ddu#ui#get_items()
Return the current items as |List| of |Dictionary| from
current buffer UI.
NOTE: current UI must support "getItems" action.
*ddu#ui#get_selected_items()*
ddu#ui#get_selected_items()
Return the selected items as |List| of |Dictionary| from
current buffer UI.
NOTE: current UI must support "getSelectedItems" action.
*ddu#ui#multi_actions()*
ddu#ui#multi_actions([{action-name1}[, {params1}], ...])
Fire multiple actions for current buffer UI synchronously.
Example: >
nnoremap <buffer> c
\ <Cmd>call ddu#ui#multi_actions([
\ ['itemAction', {'name': 'copy'}],
\ ['clearSelectAllItems'],
\ ])<CR>
<
*ddu#ui#sync_action()*
ddu#ui#sync_action({action-name}[, {params}])
Fire {action-name} action with {params} from current buffer
UI synchronously.
{args} behavior depends on {action-name}.
NOTE: It is slow than |ddu#ui#do_action()|.
*ddu#ui#visible()*
ddu#ui#visible({name}[, {tabnr}])
Return v:true if UI is visible.
{name} is specified ddu name(|ddu-option-name|).
{tabnr} is tabpage number. If it is omitted, current tabpage
is used. If it is less than 1, it means search from all tabs.
*ddu#ui#winid()*
ddu#ui#winid({name})
Return UI window ID.
{name} is specified ddu name(|ddu-option-name|).
==============================================================================
EXAMPLES *ddu-examples*
>
" You must set the default ui.
" NOTE: ff ui
" https://github.com/Shougo/ddu-ui-ff
call ddu#custom#patch_global(#{
\ ui: 'ff',
\ })
" You must set the default action.
" NOTE: file kind
" https://github.com/Shougo/ddu-kind-file
call ddu#custom#patch_global(#{
\ kindOptions: #{
\ file: #{
\ defaultAction: 'open',
\ },
\ }
\ })
" Specify matcher.
" NOTE: matcher_substring filter
" https://github.com/Shougo/ddu-filter-matcher_substring
call ddu#custom#patch_global(#{
\ sourceOptions: #{
\ _: #{
\ matchers: ['matcher_substring'],
\ },
\ }
\ })
" Set default sources
" NOTE: file source
" https://github.com/Shougo/ddu-source-file
"call ddu#custom#patch_global(#{
" \ 'sources': [#{ name: 'file', params: {} }],
" \ })
" Call default sources
"call ddu#start()
" Set buffer-name specific configuration
"call ddu#custom#patch_local('files', #{
" \ sources: [
" \ #{ name: 'file', params: {} },
" \ #{ name: 'file_old', params: {} },
" \ ],
" \ })
" Specify buffer name
"call ddu#start(#{ name: 'files' })
" Specify source with params
" NOTE: file_rec source
" https://github.com/Shougo/ddu-source-file_rec
"call ddu#start(#{
" \ sources: [
" \ #{ name: 'file_rec', params: #{ path: expand('~') } },
" \ ],
" \ })
<
==============================================================================
UIS *ddu-uis*
The UIs are used to display items.
NOTE: The UIs are not bundled in ddu.vim. You need to install them
to use ddu.vim. Please search them by https://github.com/topics/ddu-ui
------------------------------------------------------------------------------
UI OPTIONS *ddu-ui-options*
NOTE: The UIs cannot set default options for UI. If the UI need
to specify the recommended configuration, you should write it in the
documentation instead.
*ddu-ui-option-actions*
actions (Record<string, function>)
Overwrites UI actions.
*ddu-ui-option-defaultAction*
defaultAction (string)
Specify the default action.
NOTE: It overwrites kind/source default actions.
Default: "default"
*ddu-ui-option-persist*
persist (boolean)
Redraw the UI after fire actions.
Default: v:false
*ddu-ui-option-toggle*
toggle (boolean)
Quit the UI if the UI exists.
Default: v:false
------------------------------------------------------------------------------
UI PARAMS *ddu-ui-params*
These are the parameters that each UI can have. Please read the UI
documentation.
==============================================================================
SOURCES *ddu-sources*
The sources are used to get items.
NOTE: The sources are not bundled in ddu.vim. You need to install them
to use ddu.vim. Please search them by https://github.com/topics/ddu-source
------------------------------------------------------------------------------
SOURCE OPTIONS *ddu-source-options*
NOTE: The sources cannot set default options for source. If the source need
to specify the recommended configuration, you should write it in the
documentation instead.
*ddu-source-option-actions*
actions (Record<string, function>)
Overwrites source actions.
*ddu-source-option-columns*
columns (string[] | dictionary[])
It is a list of registered column names or elements which are
formatted as:
>
#{
name: {column-name},
options: {column-options},
params: {column-params},
}
<
Please see |ddu-columns|.
Items will be processed in the order you specify here.
Default: []
*ddu-source-option-converters*
converters (string[] | dictionary[])
It is a list of registered filter names or elements which are
formatted as:
>
#{
name: {filter-name},
options: {filter-options},
params: {filter-params},
}
<
Please see |ddu-filters|.
Items will be processed in the order you specify here.
Default: []
*ddu-source-option-defaultAction*
defaultAction (string)
Specify the default action.
NOTE: It overwrites kind default actions.
Default: ""
*ddu-source-option-ignoreCase*
ignoreCase (boolean)
If it is True, ddu ignores case.
Default: v:false
*ddu-source-option-matcherKey*
matcherKey (string)
Matcher compare key for items.
Default: "word"
*ddu-source-option-matchers*
matchers (string[] | dictionary[])
It is a list of registered filter names or elements which are
formatted as:
>
#{
name: {filter-name},
options: {filter-options},
params: {filter-params},
}
<
Please see |ddu-filters|.
Items will be processed in the order you specify here.
Default: []
*ddu-source-option-maxItems*
maxItems (number)
It is the max number of source items.
It is applyed after sorters.
Default: 10000
*ddu-source-option-path*
path (string | string[])
Specify an initial narrowing path.
NOTE: You can represents a path by two way like below.
"/aa/bb/cc" (string)
["/", "aa", "bb", "cc"] (string[])
NOTE: It must be full path.
*ddu-source-option-sorters*
sorters (string[] | dictionary[])
It is a list of registered filter names or elements which are
formatted as:
>
#{
name: {filter-name},
options: {filter-options},
params: {filter-params},
}
<
Please see |ddu-filters|.
Items will be processed in the order you specify here.
Default: []
*ddu-source-option-volatile*
volatile (boolean)
Refresh items when |ddu#redraw()|.
It is useful if the source depends on user input.
NOTE: It is slow for filtering.
Default: v:false
------------------------------------------------------------------------------
SOURCE PARAMS *ddu-source-params*
These are the parameters that each source can have. Please read the source
documentation.
==============================================================================
FILTERS *ddu-filters*
The filters are used to filter items from the sources.
"matchers": Filter items by user input.
"sorters": Sort items.
"filters": Convert item's attributes.
The filters are applyed the following order.
"matchers" -> "sorters" -> "converters"
NOTE: "matchers" must not sort items. Because later "sorters" overwrites the
sort.
NOTE: The filters are not bundled in ddu.vim. You need to install them
to use ddu.vim. Please search them by https://github.com/topics/ddu-filter
------------------------------------------------------------------------------
FILTER OPTIONS *ddu-filter-options*
Undefined now
------------------------------------------------------------------------------
FILTER PARAMS *ddu-filter-params*
These are the parameters that each filter can have. Please read the filter
documentation.
==============================================================================
COLUMNS *ddu-columns*
The columns are used to overwrite |ddu-item-attribute-display|.
It is useful for tree items.
NOTE: The columns are applyed before |ddu-filters|.
NOTE: The columns are not bundled in ddu.vim. You need to install them
to use ddu.vim. Please search them by https://github.com/topics/ddu-column
------------------------------------------------------------------------------
COLUMN OPTIONS *ddu-column-options*
Undefined now
------------------------------------------------------------------------------
COLUMN PARAMS *ddu-column-params*
These are the parameters that each column can have. Please read the column
documentation.
==============================================================================
KINDS *ddu-kinds*
The kinds are used to define item actions.
NOTE: The kinds are not bundled in ddu.vim. You need to install them
to use ddu.vim. Please search them by https://github.com/topics/ddu-kind
------------------------------------------------------------------------------
KIND OPTIONS *ddu-kind-options*
*ddu-kind-option-actions*
actions (Record<string, function>)
Overwrites kind actions.
*ddu-kind-option-defaultAction*
defaultAction (string)
Specify the default action.
Default: ""
------------------------------------------------------------------------------
KIND PARAMS *ddu-kind-params*
These are the parameters that each kind can have. Please read the kind
documentation.
==============================================================================
ACTIONS *ddu-actions*
------------------------------------------------------------------------------
ACTION OPTIONS *ddu-action-options*
*ddu-action-option-quit*
quit (boolean)
Quit the UI before executing action.
Default: true
------------------------------------------------------------------------------
ACTION PARAMS *ddu-action-params*
These are the parameters that each action can have. Please read the kind
documentation.
------------------------------------------------------------------------------
ACTION FLAGS *ddu-action-flags*
The action must return the flags.
The flags define the behavior after execute the action.
*ddu-action-flag-None*
None
Quit the UI window.
Default: 0
*ddu-action-flag-RefreshItems*
RefreshItems
Refresh the items.
Default: 1
*ddu-action-flag-Redraw*
Redraw
Redraw the UI window.
Default: 2
*ddu-action-flag-Persist*
Persist
Restore the UI window.
Default: 4
*ddu-action-flag-RestoreCursor*
RestoreCursor
Restore the cursor.
Default: 8
==============================================================================
TYPES *ddu-types*
Please see the TypeScript definition.
https://deno.land/x/ddu_vim/types.ts?doc
==============================================================================
CREATE UI *ddu-create-ui*
To create UI, you should read other UIs implementation.
The UIs must put under "denops/@ddu-uis/*.ts".
UI class must extend the BaseUi class.
NOTE: It must be written in TypeScript language.
NOTE: If you call Vim functions, it is not asynchronous.
------------------------------------------------------------------------------
UI ATTRIBUTES *ddu-ui-attributes*
*ddu-ui-attribute-actions*
actions (Record<string, function>) (Optional)
Defines UI actions.
The actions are called from |ddu#ui_sync_action()|.
*ddu-ui-attribute-collapseItem*
collapseItem (function) (Optional)
Called when collapse item.
*ddu-ui-attribute-expandItem*
expandItem (function) (Optional)
Called when expand item.
*ddu-ui-attribute-onAfterAction*
onAfterAction (function) (Optional)
Called after execute UI actions.
*ddu-ui-attribute-onBeforeAction*
onBeforeAction (function) (Optional)
Called before execute UI actions.
*ddu-ui-attribute-onInit*
onInit (function) (Optional)
Called before call UI functions.
*ddu-ui-attribute-params*
params (function) (Required)
Called to get UI params.