Setting up Neovim on Ubuntu

Introduction

Experiencing a tough way to set up my Neovim environment in Ubuntu server, I decided to write a blog to record the whole process.

Installation

The installation can simply be done via the following command:

sudo apt-get install neovim

However, you can not install the latest version of Neovim in this way. To install the latest version, try the following steps:

// Add the Neovim PPA to your sources
sudo add-apt-repository ppa:neovim-ppa/unstable
// Update your package lists and upgrade Neovim
sudo apt-get update
sudo apt-get install neovim

Personalization

You can configure the Neovim setup by modifying the files in ~/.config. Here I just introduce one of the famous Neovim configurations by josean. The Github is as follows:

https://github.com/josean-dev/dev-environment-files

Josean released a video in Youtube to illustrate how to set up Neovim in Macos/Linux: Youtube Link

Clone the depositary and copy the nvim folder to ~/.config locally.

When you execute nvim . command, the required packages are installed automatically. After that, you have to go the nvim/lua/josean, and run the following command:

nvim plugins-setup.lua

In this case you are viewing the plugins-setup.lua via Neovim, then input :w to notify Neovim to install all the required plugins. (If you are doing this step over other files, for example, nvim-cmp.lua inside plugins, you will meet an error warning that some plugins can not be found.)

Tips

Neovim utilizes npm to install and configure language-server (lsp), so make sure you have installed nodejs and npm in advance.

sudo apt-get install nodejs
sudo apt-get install npm

Besides, make sure your version of Neovim is over 0.8

nvim --version
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值