From e9902fad7323ef6c02e564f6c1dd6e5d48c95127 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Fri, 29 Nov 2024 17:13:20 -0800 Subject: [PATCH] feat: Add localRequire fn --- nvim/lua/lib/marleyvim/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 nvim/lua/lib/marleyvim/init.lua diff --git a/nvim/lua/lib/marleyvim/init.lua b/nvim/lua/lib/marleyvim/init.lua new file mode 100644 index 0000000..2bf596b --- /dev/null +++ b/nvim/lua/lib/marleyvim/init.lua @@ -0,0 +1,11 @@ +local M = {} + +---@param prefix string The string to prefix to all req calls. +function M.localRequire(prefix) + ---@param mod string The module to require. + return function(mod) + return require(prefix .. '.' .. mod) + end +end + +return M