diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-05-11 15:07:55 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-05-11 15:07:55 -0500 |
| commit | cebb280fe546190e55e071b6adbf37cd47950f34 (patch) | |
| tree | 6e7a7605f8832b1c1bd7e467884a8792a5e1fab4 /runtime/init.lua | |
initial commit
Diffstat (limited to 'runtime/init.lua')
| -rw-r--r-- | runtime/init.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/runtime/init.lua b/runtime/init.lua new file mode 100644 index 0000000..5e6bd71 --- /dev/null +++ b/runtime/init.lua @@ -0,0 +1,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 |
