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
use nvim_types::{
Array,
BufHandle,
Dictionary,
Error,
Integer,
NonOwning,
Object,
String,
TabHandle,
WinHandle,
};
use crate::opts::*;
extern "C" {
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1231
pub(crate) fn nvim_chan_send(
chan: Integer,
data: NonOwning<String>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1057
pub(crate) fn nvim_create_buf(
listed: bool,
scratch: bool,
err: *mut Error,
) -> BufHandle;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L2487
pub(crate) fn nvim_create_user_command(
name: NonOwning<String>,
command: NonOwning<Object>,
opts: *const KeyDict_user_command,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L626
pub(crate) fn nvim_del_current_line(err: *mut Error);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1645
pub(crate) fn nvim_del_keymap(
channel_id: u64,
mode: NonOwning<String>,
lhs: NonOwning<String>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L2172
pub(crate) fn nvim_del_mark(
name: NonOwning<String>,
err: *mut Error,
) -> bool;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L2497
pub(crate) fn nvim_del_user_command(
name: NonOwning<String>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L671
pub(crate) fn nvim_del_var(name: NonOwning<String>, err: *mut Error);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L889
pub(crate) fn nvim_echo(
chunks: NonOwning<Array>,
history: bool,
opts: NonOwning<Dictionary>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L938
pub(crate) fn nvim_err_write(str: NonOwning<String>);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L949
pub(crate) fn nvim_err_writeln(str: NonOwning<String>);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L2290
pub(crate) fn nvim_eval_statusline(
str: NonOwning<String>,
opts: *const KeyDict_eval_statusline,
err: *mut Error,
) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L235
pub(crate) fn nvim_feedkeys(
keys: NonOwning<String>,
mode: NonOwning<String>,
escape_ks: bool,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L835
pub(crate) fn nvim_get_all_options_info(err: *mut Error) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1781
pub(crate) fn nvim_get_chan_info(
chan: Integer,
err: *mut Error,
) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1477
pub(crate) fn nvim_get_color_by_name(name: NonOwning<String>) -> Integer;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1489
pub(crate) fn nvim_get_color_map() -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1589
pub(crate) fn nvim_get_commands(
opts: *const KeyDict_get_commands,
error: *mut Error,
) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1440
pub(crate) fn nvim_get_context(
opts: *const KeyDict_context,
error: *mut Error,
) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L963
pub(crate) fn nvim_get_current_buf() -> BufHandle;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L594
pub(crate) fn nvim_get_current_line(err: *mut Error) -> String;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1219
pub(crate) fn nvim_get_current_tabpage() -> TabHandle;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L999
pub(crate) fn nvim_get_current_win() -> WinHandle;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L95
pub(crate) fn nvim_get_hl_by_id(
hl_id: Integer,
rgb: bool,
error: *mut Error,
) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L75
pub(crate) fn nvim_get_hl_by_name(
name: NonOwning<String>,
rgb: bool,
error: *mut Error,
) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L109
pub(crate) fn nvim_get_hl_id_by_name(name: NonOwning<String>) -> Integer;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1525
pub(crate) fn nvim_get_keymap(
channel_id: u64,
mode: NonOwning<String>,
) -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L2119
pub(crate) fn nvim_get_mark(
name: NonOwning<String>,
opts: NonOwning<Dictionary>,
err: *mut Error,
) -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1578
pub(crate) fn nvim_get_mode() -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L682
pub(crate) fn nvim_get_option(
name: NonOwning<String>,
err: *mut Error,
) -> Object;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L839
pub(crate) fn nvim_get_option_info(
name: NonOwning<String>,
err: *mut Error,
) -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L700
pub(crate) fn nvim_get_option_value(
name: NonOwning<String>,
opts: *const KeyDict_option,
err: *mut Error,
) -> Object;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1975
pub(crate) fn nvim_get_proc(pid: Integer, err: *mut Error) -> Object;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1931
pub(crate) fn nvim_get_proc_children(
pid: Integer,
err: *mut Error,
) -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L519
pub(crate) fn nvim_get_runtime_file(
name: NonOwning<String>,
all: bool,
err: *mut Error,
) -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L621
pub(crate) fn nvim_get_var(
name: NonOwning<String>,
err: *mut Error,
) -> Object;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L662
pub(crate) fn nvim_get_vvar(
name: NonOwning<String>,
err: *mut Error,
) -> Object;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L311
pub(crate) fn nvim_input(keys: NonOwning<String>) -> Integer;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L338
pub(crate) fn nvim_input_mouse(
button: NonOwning<String>,
action: NonOwning<String>,
modifier: NonOwning<String>,
grid: Integer,
row: Integer,
col: Integer,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L930
pub(crate) fn nvim_list_bufs() -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1724
pub(crate) fn nvim_list_chans() -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L497
pub(crate) fn nvim_list_runtime_paths(err: *mut Error) -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1198
pub(crate) fn nvim_list_tabpages() -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1923
pub(crate) fn nvim_list_uis() -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L978
pub(crate) fn nvim_list_wins() -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1485
pub(crate) fn nvim_load_context(dict: NonOwning<Dictionary>) -> Object;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L468
pub(crate) fn nvim_notify(
msg: NonOwning<String>,
log_level: Integer,
opts: NonOwning<Dictionary>,
err: *mut Error,
) -> Object;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1095
pub(crate) fn nvim_open_term(
buf: BufHandle,
opts: NonOwning<Dictionary>,
err: *mut Error,
) -> Integer;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L899
pub(crate) fn nvim_out_write(str: NonOwning<String>);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1265
pub(crate) fn nvim_paste(
data: NonOwning<String>,
crlf: bool,
phase: Integer,
err: *mut Error,
) -> bool;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1335
pub(crate) fn nvim_put(
lines: NonOwning<Array>,
r#type: NonOwning<String>,
after: bool,
follow: bool,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L398
pub(crate) fn nvim_replace_termcodes(
str: NonOwning<String>,
from_part: bool,
do_lt: bool,
special: bool,
) -> String;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L2023
pub(crate) fn nvim_select_popupmenu_item(
item: Integer,
insert: bool,
finish: bool,
opts: NonOwning<Dictionary>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L960
pub(crate) fn nvim_set_current_buf(buffer: BufHandle, err: *mut Error);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L567
pub(crate) fn nvim_set_current_dir(
dir: NonOwning<String>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L603
pub(crate) fn nvim_set_current_line(
line: NonOwning<String>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1228
pub(crate) fn nvim_set_current_tabpage(
tabpage: TabHandle,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1008
pub(crate) fn nvim_set_current_win(window: WinHandle, err: *mut Error);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L164
pub(crate) fn nvim_set_hl(
ns_id: Integer,
name: NonOwning<String>,
val: *const KeyDict_highlight,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L1560
pub(crate) fn nvim_set_keymap(
channel_id: u64,
mode: NonOwning<String>,
lhs: NonOwning<String>,
rhs: NonOwning<String>,
opts: *const KeyDict_keymap,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L850
pub(crate) fn nvim_set_option(
channel_id: u64,
name: NonOwning<String>,
value: NonOwning<Object>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L760
pub(crate) fn nvim_set_option_value(
name: NonOwning<String>,
value: NonOwning<Object>,
opts: *const KeyDict_option,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L643
pub(crate) fn nvim_set_var(
name: NonOwning<String>,
value: NonOwning<Object>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L672
pub(crate) fn nvim_set_vvar(
name: NonOwning<String>,
value: NonOwning<Object>,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/vim.c#L672
pub(crate) fn nvim_strwidth(
text: NonOwning<String>,
err: *mut Error,
) -> Integer;
}