Why I Switched From Neovim to VSCode
Tags: webdev, programming, vscode, vim
Published: 2023-06-24 10:48:13

I recently switched back to VSCode from Neovim as my primary code editor. You may think this is weird because everyone seems to be going the other way around. Why would anyone want to move away from the most loved code editor? In this post, I'll explain why I made the switch and my experience so far.

## Why I used Neovim in the past

When I first started to code, I used to use VSCode because that's what I saw most people use. But I noticed that on my old laptop, VSCode was too slow and laggy and pretty much unusable while running a side process like a Node server. My laptop used to get so hot that I couldn't even touch it! I was spending more time waiting for intellisense than acutally writing code.

I had heard of Neovim as it was the most loved editor on the Stack Overflow survey and also from YouTubers like [ThePrimeagen](https://www.youtube.com/@ThePrimeagen) and [TJ DeVries](https://www.youtube.com/@teej_dv). It seemed like a really fun community and the overall vibe was very positive. So I tried it out. I learnt vim keybindings, lua to configure Neovim, created my own config, and started using it as my primary editor.

I loved it, it ran on the terminal, no Electron apps, no lag, no waiting for autocomplete. Everything was as smooth as butter and I felt _fast_. Learning vim keybindings was one of the best decisions of my life. I know people like to meme about how vim enthusiasts are always trying to convince people to learn vim keybindings but I truly believe that learning it will not only make you faster but also rekindle your love for programming, it did for me.

Neovim had a great plugin ecosystem, almost all the things that I used in VSCode were available in Neovim. It also made me realize that some things aren't necessary at all. For example, I used the file explorer extensively in VSCode but I didn't even install the plugin for it on Neovim. I started to understand the value of minimalism and how simplifying your setup can make you more productive.

Configuring Neovim was also a lot of fun. It gives you full control over your editor and how it looks and behaves. It allowed to optimise my editor for _me_, tailored to my specific needs. There's also something really satsifying about using an editor you configured yourself.

All of this made me fall in love with Neovim and I can confidently say that it is my favourite editor of all the ones I've used.

## Why I Switched Back to VSCode

Here are the reasons why I switched back to VSCode in no particular order.

### Copilot

[Copilot](https://github.com/features/copilot) is an indispensable part of my workflow now. I can't imagine writing code without it. They have a Neovim plugin but my experience with it was not great. It was slow, and most of the time it didn't even work. The LSP used to keep crashing and I had to restart it every few minutes. Maybe this is just a problem with my setup but I couldn't find a solution to it.

On the other hand, Copilot was built for VSCode. It works flawlessly and I haven't had any issues with it. There's also the new [GitHub Copilot X](https://github.com/features/preview/copilot-x) stuff, currently invite-only (I got an invite to test Copilot Chat) which only supports VSCode for now.

### Tiring Neovim Plugin Ecosystem

Didn't I just say that Neovim has a great plugin ecosystem? Yes, it does. But it's also tiring to keep up with it. Running `:PackerSync` was scary because you never know what plugin introduced a breaking change that you didn't notice and suddenly you can't code as your whole config breaks down. 

![Real image of my config suddenly having a winbar](https://www.nexxel.dev/images/neovim-to-vscode/broken-config.png)

Oh and now there's this new plugin manager that everyone is using called [lazy.nvim](https://github.com/folke/lazy.nvim) which is probably awesome but now I need to spend time migrating and getting used to it. It's kind of like the JavaScript ecosystem, there's always something new and shiny and you feel like you're missing out if you don't use it. It's tiring to keep up with it.

At first, I was keeping up with the new plugins, trying them out, and making sure my config was up to date, but soon I was tired of it. I just wanted to code.

VSCode's plugin ecosystem is great, installing extensions is a breeze and I don't have to worry about anything breaking. I can just focus on coding.

### Configuration

As I mentioned earlier, configuring Neovim was fun but it was also tiring and time-consuming. As much as I loved tinkering my config everyday, I realized it was a distraction. I was spending more time configuring my editor than actually coding.

I did love that I had full control over my editor though, and I think VSCode is quite configurable as well, probably not as much as Neovim but it's enough for me. I'm still using vim keybindings. I have a nice theme. I choose what I want in the UI, where I want it, and how it looks. I have a few custom keybindings and snippets here and there, but overall it's pretty minimal.

![My VSCode setup](https://www.nexxel.dev/images/neovim-to-vscode/vscode.png)

### I Got a New Laptop

I recently got a new laptop, a M1 MacBook Air, and it's a beast. So running VSCode is not a problem anymore. Everything feels very smooth. Apple silicon is amazing and I'm glad I switched to it.

It's only gotten hot once when running some [Docker Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) along with Spotify, and my browser, which is understandable. But other than that, it's been great.

### VSCode Only Tools

Some exceptional libraries and frameworks only support VSCode, which you could argue is a bad thing, but it makes sense, VSCode is the most popular code editor after all. For example [UnoCSS](https://unocss.dev) only has a VSCode extension, and it's my favourite way to write CSS. [Astro](https://astro.build) has a LSP but I've found that the experience in VSCode is much better than in Neovim.

![UnoCSS in VSCode](https://www.nexxel.dev/images/neovim-to-vscode/unocss-extension.gif)

I've also noticed that the TypeScript LSP is a bit faster in VSCode as well.

## Why Not Use a Neovim Distro?

I don't like Neovim distributions. I've tried many, and none of them had the same feel as a vanilla Neovim setup. Most of them are bloated, hard to extend, and have a lot of things I don't need. I don't want to spend time configuring a pre-configured editor. I'd rather just configure it myself. 

## Conclusion

This doesn't mean that I'm never going to use Neovim again. It's still my favourite editor and I'll be using it for minor editing tasks, tinkering stuff here and there on the terminal, taking notes, etc. But for my main editor, I'm going to be using VSCode for now. 

Let me know if you enjoyed this post, and thank you for reading!