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
use nvim_types::{
Array,
BufHandle,
Dictionary,
Error,
Integer,
NonOwning,
Object,
String,
};
use crate::opts::KeyDict_set_extmark;
extern "C" {
// https://github.com/neovim/neovim/blob/master/src/nvim/api/extmark.c#L863
pub(crate) fn nvim_buf_add_highlight(
buf: BufHandle,
ns_id: Integer,
hl_group: NonOwning<String>,
line: Integer,
col_start: Integer,
col_end: Integer,
err: *mut Error,
) -> Integer;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/extmark.c#L926
pub(crate) fn nvim_buf_clear_namespace(
buf: BufHandle,
ns_id: Integer,
line_start: Integer,
line_end: Integer,
err: *mut Error,
);
// https://github.com/neovim/neovim/blob/master/src/nvim/api/extmark.c#L805
pub(crate) fn nvim_buf_del_extmark(
buf: BufHandle,
ns_id: Integer,
id: Integer,
err: *mut Error,
) -> bool;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/extmark.c#L199
pub(crate) fn nvim_buf_get_extmark_by_id(
buf: BufHandle,
ns_id: Integer,
id: Integer,
opts: NonOwning<Dictionary>,
err: *mut Error,
) -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/extmark.c#L286
pub(crate) fn nvim_buf_get_extmarks(
buf: BufHandle,
ns_id: Integer,
start: Object,
end: Object,
opts: NonOwning<Dictionary>,
err: *mut Error,
) -> Array;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/extmark.c#L482
pub(crate) fn nvim_buf_set_extmark(
buf: BufHandle,
ns_id: Integer,
line: Integer,
col: Integer,
opts: *const KeyDict_set_extmark,
err: *mut Error,
) -> Integer;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/extmark.c#L45
pub(crate) fn nvim_create_namespace(name: NonOwning<String>) -> Integer;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/buffer.c#L63
pub(crate) fn nvim_get_namespaces() -> Dictionary;
// https://github.com/neovim/neovim/blob/master/src/nvim/api/buffer.c#L987
pub(crate) fn nvim_set_decoration_provider(
ns_id: Integer,
opts: NonOwning<Dictionary>,
err: *mut Error,
);
}