-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathddt.txt
304 lines (215 loc) · 10.5 KB
/
ddt.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
*ddt.txt* Dark Deno Terminal interface for Vim/Neovim
Author: Shougo <Shougo.Matsu at gmail.com>
License: MIT license
CONTENTS *ddt-contents*
Introduction |ddt-introduction|
Install |ddt-install|
Interface |ddt-interface|
Options |ddt-options|
Functions |ddt-functions|
Custom Functions |ddt-custom-functions|
UI Functions |ddt-ui-functions|
Ddu Sources |ddt-ddu-sources|
Examples |ddt-examples|
UIs |ddt-uis|
UI option |ddt-ui-options|
UI params |ddt-ui-params|
Create UI |ddt-create-ui|
UI attributes |ddt-ui-attributes|
FAQ |ddt-faq|
Compatibility |ddt-compatibility|
==============================================================================
INTRODUCTION *ddt-introduction*
*ddt* is the abbreviation of "Dark Deno Terminal interface".
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 *ddt-install*
NOTE: ddt.vim requires Vim 9.1.0448+ or Neovim 0.10.0+ (latest is
recommended).
Please install both Deno 1.45+ and "denops.vim" v7.0+.
https://deno.land/
https://github.com/vim-denops/denops.vim
==============================================================================
INTERFACE *ddt-interface*
------------------------------------------------------------------------------
OPTIONS *ddt-options*
*ddt-option-name*
name (string)
Specify the name.
Default: "default"
*ddt-option-nvimServer*
nvimServer
The path of Neovim server. Please see |client-server|.
NOTE: It is Neovim only.
NOTE: It is not implemented yet.
Default: ""
*ddt-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: ""
*ddt-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
names.
See also |ddt-ui-options|.
Default: {}
*ddt-option-uiParams*
uiParams (dictionary)
It is a dictionary that maps UI names to its parameters.
See also |ddt-ui-params|.
Default: {}
------------------------------------------------------------------------------
FUNCTIONS *ddt-functions*
*ddt#get_input()*
ddt#get_input({name})
Get the command line input from current cursor.
{name} is specified ddt name(|ddt-option-name|).
*ddt#start()*
ddt#start([{options}])
Creates a new Ddt.
NOTE: It can be called by "start" dispatcher in TypeScript.
NOTE: It must be called after |DenopsReady|.
NOTE: It does not work in |command-line-window|.
Refer to |ddt-options| about {options}. If you skip a value,
it uses the default value.
*ddt#ui_action()*
ddt#ui_action({name}, {action}[, {params}])
Do the {action} action in current UI synchronously.
{name} is specified ddt name(|ddt-option-name|).
{params} is action params.
NOTE: It does not work in |command-line-window|.
NOTE: You must not call it in |autocmd|.
CUSTOM FUNCTIONS *ddt-custom-functions*
*ddt#custom#load_config()*
ddt#custom#load_config({path})
Load TypeScript configuration from {path} file.
NOTE: {path} must be full path.
NOTE: The loading is asynchronous.
*ddt#custom#patch_global()*
ddt#custom#patch_global({option-name}, {value})
ddt#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 |ddt-options| for available {option-name}.
*ddt#custom#patch_local()*
ddt#custom#patch_local({ddt-name}, {option-name}, {value})
ddt#custom#patch_local({ddt-name}, {dict})
Set local options for specific |ddt-option-name|.
The arguments are the same as for |ddt#custom#patch_global()|.
*ddt#custom#set_global()*
ddt#custom#set_global({dict})
Overwrites all options to {dict}.
The key is {option-name} and the value is {value}. See
|ddt-options| for available {option-name}.
*ddt#custom#set_local()*
ddt#custom#set_local({ddt-name}, {dict})
Set local options for specific |ddt-option-name|.
The arguments are the same as for |ddt#custom#set_global()|.
UI FUNCTIONS *ddt-ui-functions*
*ddt#ui#do_action()*
ddt#ui#do_action({action}[, {params}])
Do the {action} action in current UI synchronously.
{params} is action params.
NOTE: You must not call it in |autocmd|.
*ddt#ui#get_input()*
ddt#ui#get_input()
Get the command line input from current cursor.
*ddt#ui#kill_editor()*
ddt#ui#kill_editor()
Kill the current buffer and return to the last ddt ui.
It is useful to use git editor.
==============================================================================
DDU SOURCES *ddt-ddu-sources*
*ddt-ddu-source-ddt_shell_history*
ddt_shell_history
Gather shell history.
*ddt-ddu-source-ddt_shell_history-params*
limit (number)
The limit of history lines in each history.
Default: 500
paths (string[])
History file path list.
Default: []
*ddt-ddu-source-ddt_tab*
ddt_tab
Gather ddt from tabs.
==============================================================================
EXAMPLES *ddt-examples*
>
<
==============================================================================
UIS *ddt-uis*
The UIs are used to display items.
NOTE: The UIs are not bundled in ddt.vim. You need to install them
to use ddt.vim. Please search them by https://github.com/topics/ddt-ui
------------------------------------------------------------------------------
UI OPTIONS *ddt-ui-options*
NOTE: The UIs cannot set default options. If they need to specify the
recommended configuration, you should write it in the documentation instead.
*ddt-ui-option-actions*
actions (Record<string, function>)
Overwrites UI actions.
------------------------------------------------------------------------------
UI PARAMS *ddt-ui-params*
These are the parameters that each UI can have. Please read the UI
documentation.
==============================================================================
CREATE UI *ddt-create-ui*
To create UI, you should read other UIs implementation.
The UIs must put under "denops/@ddt-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 *ddt-ui-attributes*
*ddt-ui-attribute-actions*
actions (Record<string, function>) (Required)
Defines UI actions.
The actions are called from |ddt#ui_action()|.
*ddt-ui-attribute-getInput*
getInput (function) (Required)
Called when get input command line.
*ddt-ui-attribute-redraw*
redraw (function) (Required)
Called when redraw UI.
==============================================================================
FAQ *ddt-faq*
FAQ 1: |ddt-faq-1|
How to donate money to you?
FAQ 2: |ddt-faq-2|
What means "dark powered"?
FAQ 3: |ddt-faq-3|
Why ddt.vim uses Deno?
------------------------------------------------------------------------------
*ddt-faq-1*
Q: How to donate money to you?
A: I have started github sponsorship to spend more time for Vim/Neovim
plugins. You can donate money to help me!
https://github.com/sponsors/Shougo
*ddt-faq-2*
Q: What means "dark powered"?
A: I think text editor is everything in the world. I want to do everything in
Vim(Neovim) like Emacs. It is not allowed by |design-not| in Vim. It is not
the light way to use Vim. So I have defined it as the dark way. I am the dark
Vimmer. My plugins are dark powered.
*ddt-faq-3*
Q: Why ddt.vim uses Deno?
A: Deno is asynchronous and faster than Vim script and it can be used in both
Vim and Neovim. The features are what I desired.
I have created some plugins by TypeScript. The development is very fun and
easy to maintain.
==============================================================================
COMPATIBILITY *ddt-compatibility*
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: