Skip to content

Commit f81ac7f

Browse files
committed
feat: when absolutely no parameters are supplied, load Neorg with core.defaults
1 parent 2fbb1d7 commit f81ac7f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lua/neorg.lua lua/neorg/init.lua

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ local user_configuration
1717
--- @see config.user_config
1818
--- @see neorg.configuration.user
1919
function neorg.setup(cfg)
20+
cfg = cfg or {
21+
load = {
22+
["core.defaults"] = {},
23+
}
24+
}
25+
2026
if not (pcall(require, "lua-utils")) then
21-
user_configuration = cfg or {}
27+
user_configuration = cfg
2228
return
2329
end
2430

25-
config.user_config = vim.tbl_deep_extend("force", config.user_config, cfg or {})
31+
config.user_config = vim.tbl_deep_extend("force", config.user_config, cfg)
2632

2733
-- Create a new global instance of the neorg logger.
2834
log.new(config.user_config.logger or log.get_default_config(), true)

0 commit comments

Comments
 (0)