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