If I’m being honest, when I started this quick project to reduce my Neovim plugin footprint size, I thought I was going to be able to get rid of way more plugins! Inspired by this Reddit post that setup a Neovim config using only echasnovski’s mini library, I was reminded that some of my remote server environments were still using Packer as their plugin manager, where my main machine has upgraded to Lazy. In addition, I have since expanded my main config with more applicable plugins and key maps and the Packer config was in a single neovim repo, as opposed to my more recently implemented dotfiles setup.

Right now, I am using a whopping 77 plugins. That’s mostly because I’m not great at cleaning out old plugins I don’t use as much anymore. Since I am client facing, a lot of them are around making my Markdown notes easier to manage, and Python plugins to help with scripting and file management in the terminal. This poll shows 10-25 plugins being the most common amount.

How many plugins in your config. List your favorites!
byu/Bamseg inneovim

Once I got my dotfiles to my server environment, I got to work and got rid of all the superfluous plugins like additional color schemes, todo-trouble, or others that I considered nice-to-have. After all, across all my VMs I’m mostly editing yaml, json, and python scripts and I’m not in there for a very long time. If I was a real pro, I would just use out-of-the-box Vim, but I really like the speed some key maps and plugins have given me.

You can check out my git branch here. If you decide to clone it, make sure you symlink .config folder from a ~/.dotfiles/ directory to ~/.config/. I’ve been using stow, but any symlink tool will work.

If you have a neovim config that you’d like to “minimize”, see some steps below. For any dotfile config - Neovim, tmux, zsh - I like to make these changes in a clean environment. I want to replicate as closely as possible what a fresh install and setup would be like. Here’s how I do it:

Any curly brackets in the instructions below denote a word where you can insert whatever you’d like. But, most likely you want to use the curly brackets in the final string that you use.

  1. Navigate to the machine/vm/server that you want to work on. For me, this VM doesn’t have Neovim installed yet.
  2. Install Neovim
  3. Clone your main repository to either your .config or your .dotfiles directory. And run a few commands:
  • git branch {branch-name}
  • git checkout {branch-name}
  1. You’ll now be in your branch, but everything will look the same. Start removing directories or files you don’t need.
  2. Navigate to your plugins folder or init.lua that lists all your plugins and start hacking and slashing.
  3. Once you’ve saved all those files and you can open and close neovim without any plugin errors, you’re ready to go.
  4. Navigate back to the root git directory and run a few more commands:
  • git add .
  • git commit -m {Insert a detailed commit message of what you changed and updated.}
  • git push {remote-name} {branch-name}
  1. And that’s it! Go check your Github/Gitlab and check your branches and commits. You should see everything there! Congrats.

For that last command, you can always check what your remote repo’s push name is by running git remote -v. Most often, the name will be something like origin or main. If you saw my post on having multiple remote repos, you may something like “all”. Just make sure to check before pushing!