Closed randomizedthinking closed 1 year ago
We can't work around this, you need to use a more specific init module name, maybe prefix it with something. This is not Fennel or Aniseed at work here but the Lua package.path and require
system. You should think of all of the lua
directories on your system that are under the package.path
as one big merged directory. So you shouldn't put things directly under lua/*.lua
with generic names that may collide with other files from other directories.
I recommend prefixing everything like so: https://github.com/Olical/dotfiles/blob/main/stowed/.config/nvim/fnl/dotfiles/init.fnl
I keep my init under dotfiles.init
which will end up in lua/dotfiles/init.lua
which shouldn't conflict with anything else unless something else has a file called lua/dotfiles/init.lua
. This is a core tenant of Lua and something devs will just have to deal with I'm afraid.
This is a subtle issue, and I will use an example to show it. Suppose the aniseed configuration is as follows that the aniseed init entry point is
aniseed_init.fnl
.Yet, if I launch
nvim
in any folder withaniseed_init.lua
file, thenaniseed
will use it as the initialization file. I think the issue is that aniseed (or maybe fennel) add the current directory to the search path: it might be fine for fennel coding but not for nvim.