To enable relative line number, add the following line to your init.lua
.
vim.wo.relativenumber = true
Code language: Lua (lua)
Save this file by doing a :w
or Shift + z
repeat z
.
The next time you open Neovim, you should see the relative line number enabled.