diff --git a/README.md b/README.md index 6cfa4c1..b2e3805 100755 --- a/README.md +++ b/README.md @@ -294,6 +294,27 @@ return { [^4]: It *does not* merge multiple specs for the same plugin from different files. +Example structure: + +```sh +── nvim + ├── lua + │ └── plugins # Your plugin specs go here. + │ └── init.lua # Optional top-level module returning a list of specs + │ └── neorg.lua # Single spec + │ └── telescope/init.lua # Single spec + ├── init.lua +``` + +Or + +```sh +── nvim + ├── lua + │ └── plugins.lua # Optional top-level module returning a list of specs + ├── init.lua +``` + ## :green_heart: Contributing All contributions are welcome! diff --git a/lua/lz/n/spec.lua b/lua/lz/n/spec.lua index 8373165..33206e0 100644 --- a/lua/lz/n/spec.lua +++ b/lua/lz/n/spec.lua @@ -59,7 +59,7 @@ local function import_spec(spec, result) ty = ty or vim.uv.fs_stat(path).type if not name then break - elseif ty == "file" then + elseif ty == "file" or ty == "directory" then local submodname = vim.fn.fnamemodify(name, ":r") import_modname(modname .. "." .. submodname, result) end