Post

How to install Neovim on macOS

I'll cover even the basics of the basics, assuming you don't even have brew installed and that you have never installed neovim but want to start playing with it

Contents

YouTube video

Follow me on Twitter

Where are all these files?

Introduction

  • In this video we cover the installation of Neovim in macOS.
  • I’ll cover even the basics of the basics, assuming you don’t even have brew installed and that you have never installed neovim but want to start playing with it
  • I already have brew and neovim installed on my machine, so in the video you’ll see that I’ll go through the whole process by remotely managing other computer and start from scratch
  • So you can copy all the commands
  • So you can also find all the links I share

If you like this, and want to support me

Installation process

Brew

What is brew?

  • Brew is a package manager for macOS, if you already have it installed, skip this section

Install Xcode

  • To be able to install Brew, you need the Command Line Tools (CLT) for Xcode
    • You don’t need the entire 14GB Xcode app from the App Store
1
xcode-select --install
  • You will see an app open in your Dock, open it and you will see:
    • The “xcode-select” command requires the command line developer tools
    • Click on Install and then Agree
  • It will say that takes a long time (40 hours) to install, but don’t worry:
    • For my internet speed, takes like 15 min

Install brew

  • Go to the main page https://brew.sh to find the installation command
1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • At the bottom of the installation, notice in the Next steps section that you need to configure your shell for homebrew
1
2
3
4
echo '' >>~/.zprofile
echo '# Configure shell for brew' >>~/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >>~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
  • Here’s the file that gets modified
1
cat ~/.zprofile
  • Make sure everything’s set up correctly, with the command below, you should see Your system is ready to brew.
1
brew doctor

Uninstall brew and Command Line Tools

  • Do not run the commands below, just leaving them here for reference
  • In case you want to uninstall the Command Line Tools (CLT), the command is below
1
sudo rm -rf /Library/Developer/CommandLineTools
  • In case you want to uninstall brew
1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
1
2
3
4
# Just keep in mind that this will delete the files, in case brew is used in a
# multi-user environment
sudo rm -rf /opt/homebrew/
rm ~/.zprofile

Nerdfonts

  • Most, if not all, neovim configs need special icons, so I will install nerdfonts, I’ll go with:
  • To find this font search for menlo on the page
  • Installation methods can be found at the bottom of their downloads page
1
brew install --cask font-meslo-lg-nerd-font
  • To verify the fonts were installed open Font book app on macos and search for meslo, you will see everything listed, including the icons
  • Another way of making sure the fonts were installed
1
brew install fontconfig
  • I can grep for the font name
1
fc-list | grep -i "MesloLGM Nerd Font Mono"

Neovim

  • I’ll follow the macOS install instructions in the neovim repo
1
brew install neovim
  • Then you can create a new file in neovim to test, save it with :wq
1
nvim test-file.md

Compatible terminal

  • If you want to have a seamless experience install a terminal that supports true color and undercurl
  • In my specific case, I chose kitty because it also allows me to view and paste images in neovim
  • I have a video in which I go the kitty installation process, it’s here:

Configure neovim

What’s your favorite Neovim distro?

  • Let me know down in the comments

My complete Neovim markdown setup and workflow in 2024

  • If you like this current article, you will find this quite useful:

Timeline

1
2
3
4
5
6
7
8
9
10
11
0:00 - Intro
0:35 - If you like me content, support me
0:45 - Brew installation
3:05 - Install nerdfonts
4:08 - Install neovim
5:08 - Install a compatible terminal
5:30 - RECOMMENDATION kitty
5:40 - Neobean, Kickstart, Lazyvim, or what do I use?
6:01 - RECOMMENDATION kickstart vs lazyvim
6:31 - What distro do you use and why?
6:50 - Like the video

Recommendations

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Why I switched from Alacritty to kitty, and how to configure kitty
https://youtu.be/MZNvjclifD8

02 - What is brew and how to install it in macOS
https://youtu.be/BEB7X78ivNM

03 - Install multiple apps with brew in macOS
https://youtu.be/e7Bb1uUHpa8

06 - Increase macOS key repeat rate
https://youtu.be/QAKLsFGWmNU

05 - Install nerdfonts macOS
https://youtu.be/7oCjW4dqLj4
This post is licensed under CC BY 4.0 by the author.