Closed mrcjkb closed 4 months ago
Does this PR follow the Contribution Guidelines? Following is a partial checklist:
Proper conventional commit scoping:
For example, fix(installer): some installer bugfix
[x] Pull request title has the appropriate conventional commit prefix.
If applicable:
LGTM!
require
searches thepackage.path
, thepackage.cpath
, Neovim's runtimepath, etc . It has a total of 6 loaders. To load conigs inlua/<plugins_dir>/lua
, we only need the first 2 loaders:package.preloaded
(loader cache)package.path
See also: https://pgl.yoyo.org/luai/i/package.loaders
I doubt this has any measurable impact, but it's cleaner than
pcall(require, ...)
and analysing the error message.Note: I haven't directly tested this in rocks-config.nvim, but I've tested the logic on modules in my lua directory.