Possible to compile entire config_directory from fennel?
#457
Replies: 1 comment
-
|
For the config directory, you can pass any path you want to it. The wrapper does nothing in nix other other than write it into a lua table in a file. Only at runtime does anything actually care about that value. The wrapper adds it to the relevant nvim variables and then sources the init.lua The value you pass does not even have to be a path, it can be lua code, like For this reason, we do not have options for this automatically But you can use ANY path. And this is nix. You can do a few things. You could build it in a derivation first and pass that. You can build it in the wrapper derivation itself using The thing is, if you use an impure directory, nix can't do any of that, because nix doesn't know where it is, nix is sandboxed, it doesn't have access to that until runtime. You have a totally normal nvim directory as far as most fennel tooling is concerned, that would allow you to use that tooling when using it in an impure manner, and then simply run those steps via nix when using the pure version of your config. So, you can do what you wish with your own config files. But another idea to think about. Try using include instead of require. If the thing is present at build time, i.e. you gave it a nix path and not an impure one, then the fennel compile command used should be able to bundle those extra files into it, allowing you to include extra fennel files without worrying about compiling a config directory yourself Then you can simply add some paths from nix to your fennel path and use require as include or include directly, and you should be able to have a decent experience without even using the config directory for it just via the generated fennel code provided by the wrapper. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is the only way to use fennel to use the inline code in the plugin specs?
Beta Was this translation helpful? Give feedback.
All reactions