Skip to main content
  1. Posts/

My Code Editor is Better than Yours

·4 mins·
Coding Development Tutorial Neovim Terminal Vscode Editor Customization
Loïs Gallaud
Author
Loïs Gallaud
Cloud Enthusiast •ᴗ•
Table of Contents

Alright, listen up
#

VSCode? That’s cute. But Neovim is for those who know what’s up

nvim-vsc

What did you say?
#

“I don’t know what is neovim ???”

Literally, Neovim lets you be the cool-looking guy behind the terminal. It’s a text editor inside the terminal that you can customize to your liking. But since being a developer nowadays isn’t just about what you create but also about the tools you use, Neovim is the way to go.

If you want to know more about Neovim :

neovim/neovim

Vim-fork focused on extensibility and usability

Vim Script
88463
6003

Now that we have that out of the way
#

If you are lazy like me, I’m here to help you getting started with a pre-configured Neovim setup. I have been using NvChad and tbh, it’s really good.

  • Easy to install
  • Easy to customize
  • Easy to use (if you know how to use Neovim but still)

But to be fair, you are not ready to read some docs and spend a bit of time setting up your Neovim, you can just use VSCode but you know…

NvChad/NvChad

Blazing fast Neovim framework providing solid defaults and a beautiful UI, enhancing your neovim experience.

Lua
25897
2183

The TUTORIAL (finally)
#

What I’ll be doing for the next 10 or 15 lines is to follow the official documentation of NvChad. But since you are to lazy to click on the link, I’ll just explain it here again for you.

Warning: Remember that the versions and the steps might change in the future.

Prerequisites
#

1. Neovim 0.10
#

I’m using MacOS, so I’ll be using Homebrew.

brew install neovim

It is the safest way to install consistently the latest version of Neovim but at the time of writing, brew installs 0.10.1 and as I’m not satisfied with it, I installed Neovim by source.

To do that, go to the repo

neovim/neovim

Vim-fork focused on extensibility and usability

Vim Script
88463
6003
  • Go to releases and look for the 0.10 version

    nvim-releases

  • Download the correct zip file for your architecture below Assets (you may need to unfold the assets to show the zip files)

    assets-nvim-installation

  • Run the commands detailed in the Assets section of the release page for your OS

    # For MacOS
    xattr -c ./nvim-macos-x86_64.tar.gz
    tar xzvf nvim-macos-x86_64.tar.gz
    mv nvim-macos-x86_64/bin/nvim /usr/local/bin/nvim # move the binary to the bin folder
    rm -rf nvim-macos-x86_64.tar.gz nvim-macos-x86_64 # clean up
    
  • Check on Neovim version

    nvim --version
    

2. Nerd Font
#

You will have a Code editor in your terminal, you have to make sure that you have a font that supports the icons. I’m using JetBrains Nerd Font (just ctrl + f in the page and Download the font).

Again, I don’t know for other OS but on mac just open your Font Book and add the extracted font folder.

To set it in your terminal, go to your terminal settings and go to profile > text > change the font to the one you just added.

terminal-settings

Time to install
#

If you already have a Neovim config, make sure to back it up before proceeding.

“How do I back up my Neovim config ??”

There you go:

cp -r ~/.config/nvim/ ~/nvim-backup

Or if you want to erase it:

rm -rf ~/.config/nvim
rm -rf ~/.local/state/nvim
rm -rf ~/.local/share/nvim

Ok, now that you have backed up your config, let’s install NvChad.

1. Clone the repo
#

Quoting the official documentation:

NvChad's starter repo is the actual config and it uses the main NvChad repo as a plugin

git clone https://github.com/NvChad/starter ~/.config/nvim

To run your NvChad config just run nvim in your terminal and let the magic happen.

2. Mason
#

Mason is a plugin for Neovim that makes it easy to install, manage, and update external tools, such as language servers, formatters, and linters.

Run :MasonInstallAll after lazy.nvim installed every plugin.

3. Delete .git folder
#

rm -rf ~/.config/nvim/.git

You have now a bare NvChad setup. So from now on, you can customize it to your liking and share your config with others inside a repo. My advice on getting better at Neovim is to practice commands and shortcuts using VSCode Vim extension, it’s a good way to get started.

Conclusion
#

I hope you enjoyed this tutorial and that you are now ready to use Neovim. If you have any questions, feel free to ask me on Twitter Just remember that the most important thing is to have fun and to be productive.

So, don’t spend too much time configuring your editor, JUST USE IT ……..

buff-guy-laptop

Related

Setup C++ dev on Mac
·6 mins
Coding Development Tutorial Cpp Macos Development Setup C++
AWS Cross account DNS validation
·7 mins
Infrastructure Development Tutorial Terraform Terragrunt Iac Aws
Veggie-powered Terraform
·7 mins
Coding Development Infrastructure Terraform Terragrunt Devops
Are you afraid of the Yeti ?
·5 mins
Infrastructure Development Tutorial Terraform Terragrunt Devops
Part-Time Employment as a Student
·5 mins
Cloud Terraform Iac Aws Student Employment Job