How to install and setup Neovim with awesome plugins
# Neovim-config
My personal Setup files for Neoconfig
Welcome to my blog. If you are reading this article from me then you are in luck. In this article, I am going to walk you through a step-by-step approach to setting up Neovim from scratch with some awesome features.
This tutorial applies to both Linux users and Windows users. I mean the bosses Mac users can also take a peep it should work for you guys too. I don't really know ๐๐. In simple terms the process we are going to be adopting in this tutorial is a Linux process, therefore if you are on Windows you will have to install WSL. If you are a Windows user you must install WSL before taking this tutorial. (That should be my first warning of the day, innit? Expect more๐๐๐)
The end result of our configuration in this article has the following features:
- Easy file browsing with GUI ๐
- capability to open node tree( I mean file tree on the side)
- Error line and a status bar
- accessibility to a tag bar (magic triggered by F8๐คฏ)
- Code completion for different languages(one of the most important๐, I bet you have that not. I mean a normal powerful code editor should have that).
- Different color scheme.
- Shortcut integration for multiline commenting
# Installation of Neovim
You can skip this part if you have not installed Neovim. As a Linux user you should have that not because it is a must-have but I mean it is super cool. Neovim can be installed on different Linux distributions (Ubuntu, Debian, etc)
Moving on, let's go through the steps involved.
- Access your terminal ๐ (On Windows if you are using WSL you can also search "ubuntu" if ubuntu was installed)
- Optionally you can run:
sudo apt update
- Thereafter run the command:
sudo apt install neovim
- Once the installation is finished you can just type Nvim to confirm the installation or go on to test with a new file directly by typing:
*nvim test.txt*
# custom configuration
It's go time! Let's get to the icing on the cake๐๐
- check if you have any previous configuration by typing "ls -la in the terminal". if you can't find the .config directory then you will have to create one using the code:
mkdir .config
- Also enter the .config directory(Please don't neglect the "." before the config. It shows that it is a hidden directory and also helps the configuration to target the certain directory). Use the command below to navigate into the .config directory:
cd .config/
- Make another directory called nvim in the .config directory.
mkdir nvim
- Enter the created directory.
cd nvim
- Create a new file called "init.vim". This is more like our configuration file.
nvim init.vim
# writing codes to configure each functionality
It's going to be a long one but is it worth it?๐ฅด๐ง๐ค๐คจ Give me the benefit of the doubt.
in the init.vim write the following codes:
:set number
:set relativenumber
hit escape and write :wq to save the progress of the configuration.
retype nvim init.vim to see the changes. That's how we roll๐.
Access this link to get all the init.vim for the whole process to make this easier.
https://github.com/fasakinhenry/Neovim-config/blob/master/init.vim
Just copy and paste the contents into your init.vim or you just follow through this article.
Back to the conversation here. Add more codes to the "init.vim" file.
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set mouse=a
hint: when you want to copy these codes directly just copy the codes above. Then in your init.vim file. press 'Esc' followed by command :set paste. Then you hold 'shift' and right-click your mouse to paste๐ด๐ฅฑ๐ too long๐ฅด
# Adding plugins ๐