LazyVim – Stable Productivity with Neovim

16 June 2024

The Rails community is familiar with the Japanese term Omakase, as used to describe the spirit of the Rails framework. It’s well covered in the Rails Doctrine.

How do you know what to order in a restaurant when you don’t know what’s good? Well, if you let the chef choose, you can probably assume a good meal, even before you know what “good” is. That is omakase. A way to eat well that requires you neither be an expert in the cuisine nor blessed with blind luck at picking in the dark.

That’s what LazyVim brings to Neovim, courtesy of an expert chef. Having spent many hours honing a Neovim configuration to suit my taste, and tiring of the Sisyphean battle that comes with dealing with package updates that break parts of your configuration (that you only notice days or weeks after the breaking change), I was curious to see if this could alleviate some of these pain points.

LazyVim provides a base configuration of plugins, keymaps, and settings for Neovim that the author, Folke (or the chef to continue the Omakase analogy) has refined to work together cohesively. Folke is one of the stalwards of the Neovim community and has authored well over a dozen Neovim plugins. It’s incredibly liberating to pass the setup and maintenance responsibility of my Neovim configuration to someone who knows the ins and outs of it far better than I do, and who can keep that layer up to date over time.

I’ve built my own Neovim configuration from scratch before, but took the plunge to build a new configuration on top of the LazyVim starter last week. After cloning the starter, and investing a little effort in learning some new patterns and migrating some settings, I was able to achieve a more refined, cohesive, and feature rich Neovim experience than my own configuration I crafted from scratch over years. It took a bit of time to rewire my brain around the new keymap mnemonics in LazyVim, but the reward was worth the pain.

Neovim configured on top of LazyVim

The optional extras

Fancy pairing a sauce with your meal? The chef has you covered. LazyVim has “extras” for common configurations that can be enabled separately. These include language specific configurations such as for Ruby, TypeScript or Go, but cohesive configurations for linting, snippets and refactoring. It’s worth enabling the appropriate extras for your workflow and learning their behaviour instead of trying to configure these yourself.

LazyExtras

Leaving the golden path

Not everything the chef prepares will be to the liking of every patron. There are a couple of changes I’ve made to LazyVim’s defaults:

Sticking with it

I’ve been using my new LazyVim-based configuration on Ruby, Go and TypeScript codebases for a week now and I’m going to stick with it going forward. It’s been a long time since I’ve felt this excited about an editor, and for it to still be Neovim having used vim for over a decade is particularly satisfying. If you’ve tried using vim before, but felt the burden of learning vimscript or lua configure it wasn’t worthwhile, have a look at Neovim with LazyVim.

When I’m coding I don’t want to be distracted by issues with my text editor. If Neovim gets in my way, I’d be better off using another tool. LazyVim with its Lazy Extras, show great promise as a stable baseline that I can sprinkle a small amount of custom settings over.

If you’re looking for some inspiration, I’ve pushed my configuration to GitHub. The lua/config and lua/plugins contain the most interesting parts.