Closed pogyomo closed 3 weeks ago
Change third argument of submode.create
to take a function which take a function to register default mappings like below may be good.
submode.create("test", { mode = "n" }, function(default)
default("1", function() vim.notify("1") end)
default("2", function() vim.notify("2") end)
end)
-- test is sealed automatically
I think for backward compatible, submode.create
should accept both function and mappings.
It may be good to automatically seal submode, as writing
submode.seal
may be forgot.