matkv.dev


My Neovim in VSCode setup

Tags:

So, I think I’ve finally managed to get a working setup for Neovim keybindings in VSCode going. In fact, I’m not only using the Neovim keybindings - I’m actually running Neovim inside VSCode.

I’ve been checking out this Neovim plugin for VSCode. Here Neovim is used for the actual code editing but you still have a normal Visual Studio Code experience. After a bit of tinkering - it seems that I now have a setup with which I can actually be productive while getting the best of both worlds.

For Neovim, I’m using LazyVim and its developer folke just recently put out an additional feature called extras, which also includes one for VSCode. This basically disables all the existing plugins except for some very basic ones that are useful for purely text editing and wouldn’t mess things up when using Neovim inside VSCode. It also sets some useful keybindings that make using VSCode feel more like Neovim.

So now I basically didn’t have to mess up my existing Neovim config at all, just needed to enable this extra and pretty much everything seems to work out of the box.

This means I don’t need to unlearn/relearn any muscle memory when jumping between Neovim and VSCode + I get the benefit of having a easy and mostly automatic setup of debugging and testing for basically any language I want to use. I tried it out for a bit in a Go project and it all just seems to work. I’ll play around in a C# project too and see if everything seems fine there too.

I’ll eventually still go through all the settings in the VSCode plugin once again and check if I can improve some stuff but for now it seems like I’ve finally managed to find a setup that let’s me work comfortably. Super happy about that.

Maybe this means I’ll finally start working on actual projects again instead of fucking around with my editors all the time. Haha.