Korora progress backup
This commit is contained in:
parent
74f2ea1e2c
commit
63d980ddf9
3 changed files with 361 additions and 0 deletions
home/features/neovim/config/lua/my
|
@ -118,6 +118,10 @@ local function recursive_assign(source, destination)
|
|||
end
|
||||
|
||||
function M.configure(opts, context)
|
||||
if type(opts) == "function" then
|
||||
return M.configure(opts(context), context)
|
||||
end
|
||||
|
||||
if type(opts.mk_context) == "function" then
|
||||
context = opts.mk_context(context)
|
||||
end
|
||||
|
@ -223,5 +227,34 @@ function M.withSavedCursor(callback)
|
|||
vim.api.nvim_win_set_cursor(0, cursor)
|
||||
end
|
||||
-- }}}
|
||||
-- {{{ Fixup lazy spec generated by nix
|
||||
function M.prepareLazySpec(spec)
|
||||
for _, module in ipairs(spec) do
|
||||
if spec.tempest ~= nil then
|
||||
spec.config = function(lazy, opts)
|
||||
M.configure(spec.tempest, { lazy = lazy, opts = opts })
|
||||
end
|
||||
end
|
||||
|
||||
if spec.dependencies ~= nil then
|
||||
spec.dependencies = spec.dependencies.lua
|
||||
end
|
||||
|
||||
if spec.keys ~= nil then
|
||||
local keys = spec.keys
|
||||
if spec.keys.mapping ~= nil then
|
||||
keys = { keys }
|
||||
end
|
||||
|
||||
for _, key in ipairs(keys) do
|
||||
key[1] = key.mapping
|
||||
if key.mode ~= nil then
|
||||
key.mode = H.string_chars(key.mode)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- }}}
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue