Olical / aniseed

Neovim configuration and plugins in Fennel (Lisp compiled to Lua)
https://discord.gg/wXAMr8F
The Unlicense
610 stars 28 forks source link

aniseed.macros module not found #25

Closed PabloReszczynski closed 3 years ago

PabloReszczynski commented 4 years ago

Hello, first of all thank you for this great project. After updating aniseed to the newest version, I'm getting the following error upon loading neovim:

Compile error in /home/pablo/.config/nvim/fnl/dotfiles/init.fnl:1                               
  aniseed.macros module not found.                                                              
(module dotfiles.init                                                                              
Olical commented 4 years ago

Are you running the latest version of Neovim from master? And possibly using packer to fetch plugins?

steelsojka commented 4 years ago

I'm getting this same error after updating. I'm using the latest built master of neovim, but using vim-plug.

PabloReszczynski commented 4 years ago

@Olical I'm using master branch of Neovim and vim-plug too

Olical commented 4 years ago

So this is because Neovim removed a core feature I relied on and I don't think the alternative system is done, so I'm struggling to support Neovim master right now, which I don't use. I use the stable release and always aim to support that first and foremost.

https://github.com/wbthomason/packer.nvim/issues/81#issuecomment-722120979

I need to spend some time, hopefully this weekend trying to work out how to get a list of all plugins / runtime path items as Neovim starts up from Lua. I used to use package.path (which is now basically empty on master) and it seems like runtimepath isn't even being populated.

I need a string or list of every runtimepath directory such as ~/.local/share/plugged/aniseed so I can add them to the fennel.path which is used when loading macro files. I'll be looking into this in my free time soon but if anyone can find a solution on master before me (again, I don't use it so I have no idea right now) that'd be amazing.

All we need to do is update the following file to populate fennel.path correctly. I'm just unsure where that information can be found now, it's a shame it was removed, I thought it was a really useful feature :disappointed: I guess there will be a good replacement, but I'm unaware of what that will look like right now.

https://github.com/Olical/aniseed/blob/a2163618679841c7e206dde1b982239eaf02590a/fnl/aniseed/fennel.fnl

Sorry for the issues this is causing everyone, hopefully we can get it fixed ASAP. Until then the best I can recommend is to rewind your Neovim version to the commit before they removed this synchronisation, I'm not sure which one that is, but it's mentioned in the issue I linked.

Olical commented 4 years ago

I've been trying to work this out with someone else in the #help channel of the Conjure discord for a few days, thanks for raising an issue about it, much better visibility.

PabloReszczynski commented 4 years ago

Hey! I really appreciate you getting off your path to help the neovim master's users out there! I really wish there was something I could do to help, but sounds like this may need to wait for a fix on neovim's team side.

Olical commented 4 years ago

I think they've made an intended change, it's just a breaking change for anyone who relied on the runtimepath / package.path strings (me). I don't think there's a solution that anyone knows of yet, so I'm gonna have to find one :sweat_smile:

Olical commented 4 years ago

I think I fixed everything on develop :slightly_smiling_face:

Also made custom macro file loading work more consistently, so now you can load custom macro files in your dotfiles and plugins in the way that you'd expect. I.e. requiring the macro file conjure.macros would load it from fnl/conjure/macros.fnl under your plugin source.

I think this was already working well for the editor config scenario but I've unified how it works.

Olical commented 3 years ago

I'll release this today, no issues found so far while I continue to use it with stable Neovim. I assume it's working fine for those of you on 0.5 too. Sorry about the delay!

Olical commented 3 years ago

Closing this now since I think it's all fixed :smile:

Olical commented 3 years ago

I've pushed a change to develop which allows you to put let g:aniseed#env = v:true in your dotfiles to have it compile and load your Fennel editor config! This should work around lazy loaders etc while also being easier to add to your file. I hope! You can still use the old way but this might be useful, check out the README and :help aniseed on the develop branch for more!