Embracing Neovim

Neovim Logo

It's well known that most developers use VS Code. This shouldn't be a surprise to anyone because beginners will always prefer to start with something that "Just Works" (TM), and chances are they'll go with whatever most people are already using.

A very common pattern in developers (and computer users in general) is that once they get used to some tool, they'll refuse to try something different. This includes what operating system they have installed, what programming languages they write and, of course, what text editor they use.

In contrast, there are people that will instead be more curious and willing to try different things to see if they can improve their workflow in any way. It was this curiosity what motivated me to learn about Linux and eventually become good at using the terminal.

Dennis Nedry running Arch and Gentoo

I wanted to know if there would be a text editor that would fit better into my workflow, and to do this I had to put aside what I was familiar with and start learning stuff from a different perspective.

These are the main things I wanted to change about my workflow:

So, I only had to run vimtutor, memorize every Vim trick in existence and uninstall every other form of text editing software I had installed, right? Well, it's not really that simple. There are some features that I consider essential for working in large projects, the main ones being:

During my research I found Neovim and the coc.nvim plugin. This was good enough as a starting point and made it easier for me to make the jump from typical IDEs.

Around that time, the Neovim 0.5.0 release was right around the corner. This release added support for writing the configuration files in Lua (init.lua) instead of Vimscript (init.vim), and introduced native LSP and Tree-sitter support. Every subsequent release has improved these features and their APIs, and plugins written in Lua have progressively become better.

Neovim completion

Neovim diagnostics

I wrote my Neovim configuration entirely from scratch, adding and removing plugins as I needed. This takes a lot of time, so I only recommend this approach to people that enjoy this process of customizing stuff, like I do.

There are a handful "Neovim distributions" like LunarVim and NvChad that offer initial setups that include all the features I listed above and more, but instead I recommend using a configuration template like kickstart.nvim because it's more flexible and has a structure that is simpler and cleaner than most of these distributions, and includes comments as documentation for helping with customization.