10

Currently a (neo)vim user, I read that VS Code supports neovim backend integration, but after searching I cannot find how to set it up.

How to set up neovim integration in VS Code?

I use both linux and windows so if there are some OS specifity you could mention it.

2

1 Answer 1

0

The vscode-neovim extension is what you're looking for. Rather than emulating vim motions, it actually links to an installed version of neovim and provides the connections between neovim components and their VS Code counterparts. The README of the project does a good job at delineating what exactly is going on here. Most notably, you can use your existing neovim installation to power this setup. If you're on Linux, you simply link to your neovim executable. If you're on Windows, you can link to a Windows neovim install, but I prefer to link to my normal Linux neovim via WSL using the vscode-neovim.useWSL setting in VS Code (after installing the extension). It will use the neovim instance in your default WSL distro at the path specified in the vscode-neovim.neovimExecutablePaths.linux setting. Because it is using your "real" neovim install, you can even utilize lots of neovim plugins. You'll want to disable plugins that overlap with VS Code's responsibilities like colorschemes, LSP, fuzzy finders, etc., but things like surround plugins, flash.nvim, etc. will work like normal. If you're using lazy.nvim to manage packages, you can disable certain plugins in VS Code by adding the cond = not vim.g.vscode line to your plugin spec.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.