You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nvim-libmodal/lua/libmodal/src/utils/classes.lua

17 lines
280 B
Lua

return
{
--- Define a metatable.
--- @param template table the default value
new = function(template)
-- set self to `template`, or `{}` if nil.
local self = template or {}
-- set `__index`.
if not self.__index then
self.__index = self
end
return self
end,
}