From a993b357ab86e153ecd50e2d4b704b8dcffedc1f Mon Sep 17 00:00:00 2001 From: Jonathan Neidel Date: Fri, 7 Jul 2023 15:10:27 +0200 Subject: [PATCH] fix(docgen): inline `esupports.metagen` template function definitions (#945) --- .../modules/core/esupports/metagen/module.lua | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lua/neorg/modules/core/esupports/metagen/module.lua b/lua/neorg/modules/core/esupports/metagen/module.lua index 6f336b06b..479415868 100644 --- a/lua/neorg/modules/core/esupports/metagen/module.lua +++ b/lua/neorg/modules/core/esupports/metagen/module.lua @@ -41,16 +41,17 @@ module.config.public = { -- The title field generates a title for the file based on the filename. { "title", - function() - return vim.fn.expand("%:p:t:r") - end, + function() return vim.fn.expand("%:p:t:r") end, }, -- The description field is always kept empty for the user to fill in. { "description", "" }, -- The authors field is autopopulated by querying the current user's system username. - { "authors", require("neorg.external.helpers").get_username }, + { + "authors", + function() return require("neorg.external.helpers").get_username() end, + }, -- The categories field is always kept empty for the user to fill in. { "categories", "" }, @@ -58,23 +59,22 @@ module.config.public = { -- The created field is populated with the current date as returned by `os.date`. { "created", - function() - return os.date("%Y-%m-%d") - end, + function() return os.date("%Y-%m-%d") end, }, -- When creating fresh, new metadata, the updated field is populated the same way -- as the `created` date. { "updated", - function() - return os.date("%Y-%m-%d") - end, + function() return os.date("%Y-%m-%d") end, }, -- The version field determines which Norg version was used when -- the file was created. - { "version", require("neorg.config").norg_version }, + { + "version", + function() return require("neorg.config").norg_version end + }, }, }