Olical / aniseed

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

fennel config small issues #51

Closed leiserfg closed 3 years ago

leiserfg commented 3 years ago

I have been using fennel + aniseed to set my nvim config and everything works mostly fine but I found a little issue, To begin with, this is my config structure:

├──  init.lua
├──  fnl
│  └──  my
│     ├──  init.fnl
│     ├──  macros.fnl
│     ├──  mapping.fnl
│     ├──  nvim-tree.fnl
│     ├──  options.fnl
│     ├──  pkgs.fnl
│     ├──  plugins
│     │  ├──  codi.fnl
│     │  ├──  fzf.fnl

I have in the init.lua just the code to load packer and aniseed and to set the aniseed#env to point to my.init init.fnl loads options and plugins (in that order). Plugins setups packer to load the configs of each plugin on-demand ("pcalling" require). But my problem is that there are some options that have to be set before loading several plugins, as mapleader, maplocalleader and termguicolors. So I had to set those in init.lua as it's the only way I managed them to be loaded before the plugins configs (and it's required other way they still have the old values). But I was checking your config and you didn't have to do that. Is there something I'm doing wrong, or missing?

In case you wanna have a look, this my config, https://github.com/leiserfg/dots/tree/master/.config/nvim

Olical commented 3 years ago

Hmm I'm not exactly sure right now, but if you check out how I load my packer plugins I actually directly require the config module myself rather than letting packer do it: https://github.com/Olical/dotfiles/blob/b86ecf285e9eb533e9e2b5953d76f32614f50d36/stowed/.config/nvim/fnl/dotfiles/plugin.fnl#L12-L23

I think I also ran into many issues if I let packer load the config, I could never get it to load fast enough, this way was the safest bet in my config at least. Maybe something similar will help you out too?

Olical commented 3 years ago

I'm going to close this for now, if you still require assistance feel free to reopen. Or maybe use the discussions tab, it's a great way to have a conversation about things that aren't exactly issues, just like a forum 🙂