DEV Community

llllvvuu
llllvvuu

Posted on

1

Improving Neovim load time on WSL 2

Recently I decided to duplicate my Neovim setup from MacOS to WSL. On MacOS, I never had any load time issues, but to my shock, on WSL it took 2 seconds to start Neovim and another 2 seconds to lazy load more plugins when opening a file!

The root cause of this is the slow filesystem calls between WSL and the host Windows which affects the search for executables. This can be addressed in 3 areas:

  1. Bypass clipboard.vim search for executables.
  2. Don't add Windows $PATH to WSL $PATH
  3. Deduplicate $PATH (add this to the end of .bashrc/.zshrc)

A nice side effect of these steps is that bash/zsh becomes much faster as well (especially with autocompletion/autosuggest).

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

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

Okay