Current state
lua/config/util/init.lua constructs the config directory path by concatenating a hardcoded string: vim.env.HOME .. '/Repos/ooloth/config.nvim/lua/config/'. If this directory does not exist — on a new machine before the repo is cloned, with a different clone location, or if NVIM_APPNAME changes the expected path — vim.fn.readdir raises an unhandled Lua error at startup with no context about which path was expected or why it was missing. All lang plugins fail to load silently after the error.
Ideal state
require_all_files_in_config_directory checks that the resolved directory path exists before calling vim.fn.readdir
- If the directory is absent,
vim.notify emits an error-level message containing the full expected path so the user can diagnose the missing directory
- Neovim continues to start (without lang plugins loading) rather than aborting with a hard Lua error
Starting points
lua/config/util/init.lua lines 37–45 — the hardcoded path construction and vim.fn.readdir call
QA plan
- Run
HOME=/tmp nvim --headless -c "qall" to simulate a missing config directory
- Expect a
vim.notify error message naming the expected path (e.g. /tmp/Repos/ooloth/config.nvim/lua/config/), not a raw Lua stack trace
- Expect Neovim to exit cleanly (exit 0) rather than aborting with a hard error
- Run
nvim --headless -c "qall" with the real HOME — expect normal startup with no error messages
Done when
A missing config directory at the hardcoded path produces a vim.notify error with the full expected path, and Neovim continues to start rather than aborting.
Current state
lua/config/util/init.luaconstructs the config directory path by concatenating a hardcoded string:vim.env.HOME .. '/Repos/ooloth/config.nvim/lua/config/'. If this directory does not exist — on a new machine before the repo is cloned, with a different clone location, or ifNVIM_APPNAMEchanges the expected path —vim.fn.readdirraises an unhandled Lua error at startup with no context about which path was expected or why it was missing. All lang plugins fail to load silently after the error.Ideal state
require_all_files_in_config_directorychecks that the resolved directory path exists before callingvim.fn.readdirvim.notifyemits an error-level message containing the full expected path so the user can diagnose the missing directoryStarting points
lua/config/util/init.lualines 37–45 — the hardcoded path construction andvim.fn.readdircallQA plan
HOME=/tmp nvim --headless -c "qall"to simulate a missing config directoryvim.notifyerror message naming the expected path (e.g./tmp/Repos/ooloth/config.nvim/lua/config/), not a raw Lua stack tracenvim --headless -c "qall"with the realHOME— expect normal startup with no error messagesDone when
A missing config directory at the hardcoded path produces a
vim.notifyerror with the full expected path, and Neovim continues to start rather than aborting.