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
|
local app = require("core.app")
lemacs = lemacs or {}
lemacs.hooks = lemacs.hooks or {}
function lemacs.hooks.add(event_name, fn)
return app.add_hook(event_name, fn)
end
lemacs.keys = lemacs.keys or {}
function lemacs.keys.bind(key, target)
return app.bind_key(key, target)
end
function lemacs.keys.bind_leader(key, target)
return app.bind_leader(key, target)
end
lemacs.ui = lemacs.ui or {}
function lemacs.ui.add_view(source_type, source_index, x, y, width, height, show_cursor, bg_r, bg_g, bg_b, bg_a, fg_r, fg_g, fg_b, fg_a)
return editor.layout_add_view(source_type, source_index, x, y, width, height, show_cursor, bg_r, bg_g, bg_b, bg_a, fg_r, fg_g, fg_b, fg_a)
end
app.bootstrap()
function on_open_file(path)
return app.on_open_file(path)
end
function on_key(key)
return app.on_key(key)
end
function on_text(text)
return app.on_text(text)
end
function on_tick()
app.on_tick()
end
|