-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve macro.fnl file support #62
Comments
I was just having this issue while trying to separate my macros into multiple files. I was trying to do something like:
|
Out of interest, does it work fine on the I've made a LOT of changes on So bearing in mind there's other issues I'm fixing, it might still be worth checking if the macro file problem is fixed. I've tried this myself on |
Doesn't seem to work.
Here is the tree view:
|
Hm, so odd, I can't reproduce that but I'll try to some time soon. I'm clearly missing something since it works absolutely fine for me, so maybe I'm doing something extra that I forgot about. Do you have some config for |
This is my local execute = vim.api.nvim_command
local fn = vim.fn
local fmt = string.format
local pack_path = fn.stdpath("data") .. "/site/pack"
local function ensure(user, repo)
local install_path = fmt("%s/packer/start/%s", pack_path, repo, repo)
if fn.empty(fn.glob(install_path)) > 0 then
execute(fmt("!git clone https://github.com/%s/%s %s", user, repo,
install_path))
execute(fmt("packadd %s", repo))
end
end
ensure("wbthomason", "packer.nvim")
ensure("Olical", "aniseed")
vim.g["aniseed#env"] = {module = "core.init"} As you can see I am doing |
Even with |
This is actually working fine for me now so I think I fixed it a while back in other changes? Please reopen if not! |
Right now I think files called
macros.fnl
are the only ones copied over to thelua
dir on compilation which ensures they end up on the path. That path is used when requiring the macros, so if your macro file isn't named appropriately it either won't be copied into the right place or Ansieed will try to compile it which will error since macro files can't be compiled.There's no way to tell that something contains macros without prior knowledge, so we still have to make assumptions. I think the best bet is defaulting to finding anything ending in
macros.fnl
and making it easily reconfigurable. Then maybe don't copy them, but just add them to an exclude pattern then add the fnl dir to the macros path. (which is new in the latest fennel version!)The text was updated successfully, but these errors were encountered: