feat: init binds config
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
local M = {}
|
||||
local settings = require("lua.lib.settings")
|
||||
local bind = require("lua.lib.bind")
|
||||
|
||||
M.binds = {
|
||||
{
|
||||
keys = bind.with_leader("Return"),
|
||||
desc = "Open terminal",
|
||||
dispatcher = hl.dsp.exec_cmd(settings.apps.terminal),
|
||||
},
|
||||
{
|
||||
keys = bind.with_leader("B"),
|
||||
desc = "Open web browser",
|
||||
dispatcher = hl.dsp.exec_cmd(settings.apps.browser),
|
||||
},
|
||||
{
|
||||
keys = bind.with_leader("E"),
|
||||
desc = "Open file manager",
|
||||
dispatcher = hl.dsp.exec_cmd(settings.apps.file_manager),
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,21 @@
|
||||
local M = {}
|
||||
local bind = require("lua.lib.bind")
|
||||
|
||||
local pieces = {
|
||||
"apps",
|
||||
}
|
||||
|
||||
M.binds = {}
|
||||
|
||||
for _, piece in pairs(pieces) do
|
||||
local bind_piece = require("lua.binds." .. piece).binds
|
||||
for _, bind_item in pairs(bind_piece) do
|
||||
table.insert(M.binds, bind_item)
|
||||
end
|
||||
end
|
||||
|
||||
function M.load()
|
||||
bind.map(M.binds)
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user