fix: move lua/ and plugin/ to repo root for plugin-manager installs #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/rtp-plugin-layout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why:
the git clone root itself to 'runtimepath' and looks for lua/ and
plugin/ directly there — there's no way to point them at a
subdirectory. This repo nested both under nvim/ (to sit next to
rust/), so require("localhistory") failed for every git-based
install with "module 'localhistory' not found", even with the
rust.bin auto-detection and build-hook docs from the previous
commit in place.
What:
drop the now-empty nvim/ directory. rust/ is untouched.
walks up 3 directories instead of 4, matching the new depth of
lua/localhistory/config.lua relative to the repo root.
repo_root) needed no numeric change: the file and its target both
moved up one level, so the same two ":h" calls still land on the
repo root.
to CLAUDE.md's architecture section spelling out why lua/ and
plugin/ must stay at the repo root.
Impact:
plugin manager pointed at the git repo (reproduced and verified
fixed by adding only the repo root to 'runtimepath', matching what
a real install does). rust/ and its build/tests are unaffected;
the Lua test suite path is now
tests/run.luainstead ofnvim/tests/run.lua.Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Why: - Every plugin manager (lazy.nvim, packer.nvim, vim-plug, ...) adds the git clone root itself to 'runtimepath' and looks for lua/ and plugin/ directly there — there's no way to point them at a subdirectory. This repo nested both under nvim/ (to sit next to rust/), so require("localhistory") failed for every git-based install with "module 'localhistory' not found", even with the rust.bin auto-detection and build-hook docs from the previous commit in place. What: - git mv nvim/lua -> lua, nvim/plugin -> plugin, nvim/tests -> tests; drop the now-empty nvim/ directory. rust/ is untouched. - config.lua's plugin_root() (used by rust.bin auto-detection) now walks up 3 directories instead of 4, matching the new depth of lua/localhistory/config.lua relative to the repo root. - tests/run.lua's rtp-setup helper (renamed repo_nvim_root -> repo_root) needed no numeric change: the file and its target both moved up one level, so the same two ":h" calls still land on the repo root. - Updated README.md and CLAUDE.md path references, and added a note to CLAUDE.md's architecture section spelling out why lua/ and plugin/ must stay at the repo root. Impact: - Fixes a hard failure for anyone installing this plugin via a plugin manager pointed at the git repo (reproduced and verified fixed by adding only the repo root to 'runtimepath', matching what a real install does). rust/ and its build/tests are unaffected; the Lua test suite path is now `tests/run.lua` instead of `nvim/tests/run.lua`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>