thumbnail

[Zenn] lazy.nvimでプラグインのディレクトリを再帰的に読み込む

2025-07-03

Original: zenn.dev

結論 local specs = {} local config_path = vim.fn.stdpath("config") .. "/lua" local subdirs = vim.fn.globpath(config_path, "plugins/**/", true, true) for _, dir in ipairs(subdirs) do local module = dir :gsub(config_path, "") :gsub("/$", "") :gsub("/", ".") table.insert(specs,...