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.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay