I'm now using Neovim, BTW
Discover my journey into Neovim and LazyVim during my first month, from mastering plugin configurations and Vim motions to integrating Lazygit for a seamless development workflow. Learn how I transformed my coding experience with practical tips and personal insights!
When I first heard about Neovim, I'll admit - I wasn't convinced. I was a Jetbrains guy and that felt like a trusted companion: reliable, predictable, and just good enough. But little I knew that was a seed planted deep in my core that would someday rise and shine.
I remember my first professional IDE: IntelliJ. The first days at work I printed out in a paper all the keyboard shortcuts, and forced me to start using them.
Then, I got used to all the shortcuts and it was at that moment when I realized that I memorized all of them, but suddenly, other problems appeared: "There is no shortcut for 'open file in Explorer' - yup, I was a Windows guy - , let's map a keyboard shortcut for that: Alt + Shift + E
".
And it was good, indeed; I was constantly using it for opening excel output files or just opening the folder to create a zip file to send it or whatever. At this moment, my only language was Scala and IntelliJ had all I needed for that.
But then another problem quickly started to appear: I was going to start using other languages, like Python, or even some frontends with React. And then I found out that IntelliJ was not giving me all I needed; First I started installing Pycharm, then WebStorm for frontend development, and then the bloatware just started: "Oh, you wanna play with Rust? Use RustRover". Suddenly I was having like 5 or 6 programs for different languages, and forcing it to use in different repositories, and better not talk about the [in]famous .idea
folder and the [in]ability to share run configurations across peers by commiting to the git repository.
I decided to stop the nonsense and try something else. And nope, not yet, it was not Neovim, but VSCode.
The big, but ephemeral switch to Visual Studio Code
I forced myself to use VSCode for some time, around december 2022. In the beginning, the switch was good: "now I can use all languages on the same IDE!" But then I had to re-learn all the keyboard shortcuts. I'm sure some of you might be wondering: "There's a set of remap for Jetbrains available in VSCode", yup I already used it, but it was a complete disaster, because that was an incomplete set of remaps. And it was reasonable: in the end, VSCode was not a Jetbrains IDE, and the actions, and core functionalities were not the same.
So I preferred to start from scratch and learn VSCode native keyboard shortcuts. This time I didn't print them out but had the pdf all the time in one tab to watch it every time.
The switch was good as I quickly got used to them, and also I liked the concept idea of workspaces and its configuration - although a bit verbose (typical JSON, nothing new) - and the idea of always thinking "There's an extension for that". But I found some problems too.
The first one was related to setting up the Scala environment. It was a real pain: Scala metals, Bloop, and on top of that, the sweet icing of being behind a corporate proxy and having to deal with private repositories on Nexus. That, combined with the idea of having to use archaic Scala versions like 2.12 made me impossible to set the environment on VSCode. I never could execute a single Scala application there. And I gave up: for Scala, I would still be using IntelliJ.
Another drawback was the lack of refactoring functionalities; in my opinion, VSCode is still lightyears behind Jetbrains on this. The ability to extract, move methods up or down, create Scala traits, pull members up/down, extract superclass... just to mention some of them, the refactoring experience was, overall, a disaster on VSCode.
But I assumed that was the price to pay for using an IDE for all languages (except Scala) that I was going to use.
An IDE that is not great, not bad.... just OK.
The leap of faith: Neovim
It was october 2024 and I was going to move to AI Labs. There, I was going to stop using Scala, and I was going to switch to MacOS as my local development environment - my very first experience with Mac, MacOS and the Apple ecosystem - and I was worried about getting used to an Apple device. But then, I thought: "if you are going to learn a new OS, why don't just all-in and learn Neovim?"
And that's how the journey started.
I investigated a bit about Neovim during all those years, and each time I watched some Neovim taliban on Youtube talking about how amazing Neovim was, they were lost in all the features, configuration, and the information I was receiving was "Ok this is a PITA to configure from scratch". But then, I discovered Lazyvim.
Lazyvim is a Neovim setup with predefined features, and to me it was the entry point I needed for Neovim; it had all the IDE features you would need from the start: neo-tree, the command helpers, and the quick and easy configuration and predifined set of extras with LazyExtras
. You want all python tools for neovim? Go to LazyExtras
install language python and that is all. Pretty awesome.
The very first days at work with Neovim was a bit struggling, but I somehow managed to make my first commits and pull requests, and all of that thanks to Lazygit: what an amazing TUI for managing your git repository; since then I barely do some specific git commands except when I am using a branch and I want to do git rebase -i dev
when I need to reorder some commits and squash.
Lazydocker is also a great tool to see all your logs. Easy to use, keyboard shortcuts are similar to lazygit - in fact the two tools are from the same contributor - and the experience is pleasant.
"What if I change this..?"
I recently got into the new phase, the phase where you want to tweak your own things.
For example, you want to use your own theme, or install a new one. So I decided to use this theme for example. So it's as simply as to creating a .lua
file in ~/.config/nvim/plugins
, and install your favorite themes and set your defaults like this:
return {
{ "ceigh/vercel-theme.nvim" },
{ "neanias/everforest-nvim" },
{
"LazyVim/LazyVim",
opts = {
colorscheme = "vercel",
background = "vercel",
},
},
}
et voilà:
Then I decided to use a new plugin which is not into the Lazyvim ecosystem, which is rayso.nvim, so that I can create beautiful screenshots from neovim easily. And then, I configured some keymaps:
vim.keymap.set("x", "<leader>ry", ":Rayso<CR>", { desc = "Generate Ray.so image", noremap = true })
This basically says:
"If you are in visual mode, use <leader>ry (default is <space> in lazygit) and it executes :Rayso
and presses "Enter". And then some description for help.
And then, I can select a piece of code, press <space>ry
and it opens a Rayso browser page with the code to easily copy or whatever. Awesome.
Configuration is easy, and it can be easily version tracked with git. I am right now considering to create my own dotfiles repository but I think I don't have what it takes to do it yet, but will do in the future, I am sure.
Not everything is pink
I found some struggle with Neovim too. For example, I can't go back and forth on the IDE similar when you browse on the web. I was doing that constantly on previous IDEs. In theory, the keymap for that is <c-o>
(Ctrl + O) but it clashes with my Zellij configuration, as it is the same keyboard combo to open the session manager. I have to dig into it and see how to modify the keymap, but I am too lazy for that now.
Another thing which is not so great is the debugger with the debug interface for nvim, which is nvim-dap
and it is installed with the LazyExtras
. But this is personal preference, and I already did some debugging with it and... well, I think I can get used to.
The copilot plugin is great but I only use it for chat (not autocompletion, I find it too distracting), I like the idea to go to the copilot only when I want.
But I also love the way to create custom prompts and use them. I created a custom prompt to create docstrings using google convention and pydocstring standards. And the result is pretty awesome. You can configure all in your nvim configuration folder.
My honest conclusion
I am happy with the change. I feel quicker, and if there is something I want to be quicker, I create a keymap for that. The IDE is incredibly quick, and with Lazygit you feel supercharged.
It is always better to have your own IDE, your own preferences, your own routines and automations. And Neovim is the perfect for that. But expect to be not too productive at the very beginning. But oh boy, when you finally get used to it, you probably won't come back.
It was one of my new year resolutions for 2024. And I feel I got it. The pleasure is infinite, and I finally can say:
"I use neovim, BTW"
I would love to know your thoughts or opinions. You can always reach to me on X on @Musantro.