style: re-format
This commit is contained in:
+19
-19
@@ -3,34 +3,34 @@ local bind = require("lua.lib.bind")
|
||||
local utils = require("lua.lib.utils")
|
||||
|
||||
local pieces = {
|
||||
"apps",
|
||||
"window",
|
||||
"workspace",
|
||||
"passthrough",
|
||||
"apps",
|
||||
"window",
|
||||
"workspace",
|
||||
"passthrough",
|
||||
}
|
||||
|
||||
M.binds = {}
|
||||
M.submaps = {}
|
||||
|
||||
for _, piece in pairs(pieces) do
|
||||
local p = require("lua.binds." .. piece)
|
||||
local bind_piece = p.binds
|
||||
for _, bind_item in pairs(bind_piece) do
|
||||
table.insert(M.binds, bind_item)
|
||||
end
|
||||
local submap = p.submaps
|
||||
if submap then
|
||||
M.submaps = utils.tbl_recursive_merge(M.submaps, submap)
|
||||
end
|
||||
local p = require("lua.binds." .. piece)
|
||||
local bind_piece = p.binds
|
||||
for _, bind_item in pairs(bind_piece) do
|
||||
table.insert(M.binds, bind_item)
|
||||
end
|
||||
local submap = p.submaps
|
||||
if submap then
|
||||
M.submaps = utils.tbl_recursive_merge(M.submaps, submap)
|
||||
end
|
||||
end
|
||||
|
||||
function M.load()
|
||||
bind.map(M.binds)
|
||||
for name, binds in pairs(M.submaps) do
|
||||
hl.define_submap(name, function()
|
||||
bind.map(binds)
|
||||
end)
|
||||
end
|
||||
bind.map(M.binds)
|
||||
for name, binds in pairs(M.submaps) do
|
||||
hl.define_submap(name, function()
|
||||
bind.map(binds)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user