TIL: Neovim 0.9, AstroNvim, and Astrocommunity are great

Posted on May 13, 2023

I really enjoy tinkering with my Neovim setup (perfect thing to do on long train rides). However, lately I didn’t have a lot of spare time and getting my setup to where I want it took away too much time from my other fun projects. Luckily I discovered AstroNvim and Astrocommunity.

Why Neovim 0.9 and NVIM_APPNAME is amazing for tinkering

With the release of Neovim 0.9 and the introduction of the NVIM_APPNAME environment variable, experimenting with new configs has become super easy. You can just create a new config in a new folder and switch back to your old config without the folder-renaming-backup-hassle.

What I like about AstroNvim

I so far experimented with AstroNvim and I really like it so far. It is one of these pre-configured Neovim configs like LunarVim, SpaceVim. I like about AstroNvim that the configuration system is pretty straightforward and doesn’t use much abstraction or indirection over a bare-bones Neovim config. Hence, adapting the out-of-the-box experience is easy (you don’t have to learn as much of their special config system), and even more importantly, it will be easier to migrate my config away from AstroNvim when I want to.

Astrocommunity to the rescue

Despite all this, I still struggled to set up rust-tools 🙈 (I think I would have needed to deactivate the mason-lspconfig setup of rust-analyzer). Since I was short on time, I just used the rust.pack from Astrocommunity which worked first try and is easy to configure (you can look at my rust-tools setup here). Using the community plugin system kind of defeats the purpose of having a config without abstraction layers and indirection, but I like the option to get something working quickly (and have others care about API breaking changes 😬).

Anyway, I guess this article is going from sticks to pebbles but I promised myself to write more without perfectionism destroying my flow ¯_(ツ)_/¯.

Here is my AstroNvim config if you want to have a look: https://github.com/SimonCW/dotfiles/tree/main/nvim/.config/AstroNvim/lua/user