From 9ae3d6bc1d52e926ead8ee60e0a2c5f517e7b0e9 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Wed, 11 Nov 2026 12:55:52 +0000 Subject: [PATCH] fix: plugins not loaded when started with `nvim -u` --- lua/custom/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 27290873a3f..4c19dcb6f00 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -5,7 +5,7 @@ -- Iterate over all Lua files in the plugins directory and load them. -- `vim.fs.dir()` iteration order is unspecified and must not be relied upon. -local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins') +local plugins_dir = vim.fs.dirname(debug.getinfo(1, 'S').source:sub(2)) for file_name, type in vim.fs.dir(plugins_dir, { follow = true }) do if (type == 'file' or type == 'link') and file_name:match '%.lua$' and file_name ~= 'init.lua' then local module = file_name:gsub('%.lua$', '')