Add nil guard to lazy.load and custom mini.diff mappings
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7c5529c400
commit
61f2c89362
@ -7,7 +7,9 @@ M.load = function(name, fn)
|
||||
return
|
||||
end
|
||||
M._loaded[name] = true
|
||||
if fn then
|
||||
fn()
|
||||
end
|
||||
end
|
||||
|
||||
M.on_event = function(name, event, pattern, fn)
|
||||
|
||||
@ -128,6 +128,10 @@ end)
|
||||
lazy.on_event("diff", "BufReadPost", "*", function()
|
||||
require("mini.diff").setup({
|
||||
source = require("mini.diff").gen_source.git({ index = false }),
|
||||
mappings = {
|
||||
apply = "gs",
|
||||
textobject = "",
|
||||
},
|
||||
})
|
||||
end)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user