DEV Community

Zachary Churchill
Zachary Churchill

Posted on

Using VSCode Neovim with a separate config

I'm primarily a neovim user, but occasionally, for pairing with my coworkers remotely, I'll use vscode.

using this option
Image description
allows you to set an init folder different from the default, as I've done here.

One problem that many neovim users may run into is that if you use neovim's native plugins feature (even through a package manager), any plugins that are broken or obsoleted by vscode are still in your rtp. Here's how you fix that:

Image description

The --clean flag removes the plugins directory from your runtime path before neovim starts, you can still opt into plugins as I've done here

vim.opt.rtp:append(os.getenv('HOME') .. '/.config/nvim-code')
vim.opt.rtp:append(os.getenv('HOME') .. '/.local/share/nvim/site/pack/packer/start/tabular/')

require('plugins.unload')
require('settings')
require('keybindings')
Enter fullscreen mode Exit fullscreen mode

I hope this helps you stay comfy when working with coworkers :)
no more ctrl+w closing my editor for me.

Top comments (0)