Skip to content

gnoblin.load ​

Evaluate another Lua config file in the current config state. Relative paths resolve from the file making the call. A glob is sorted before evaluation; a pattern with no matches is ignored. See the file loading guide.

lua
gnoblin.load("conf.d/**/*.lua")

A missing explicit file is an error. Config loading is limited to 32 nested files.

Lua require ​

require is a global function, not a member of gnoblin. It loads a local module from beside the calling file or its lua/ directory, caches the result for the current reload, and returns it. It does not support Lua's normal installed module search paths.

lua
local appearance = require("appearance")
gnoblin.configure(appearance)

Module names cannot contain ..; use gnoblin.load("parts/motion.lua") for explicit subdirectories.

Type definition ​

lua
gnoblin.load(path_or_glob) -- string; missing explicit paths are errors
require(module_name) -- string; local module name, no `..`