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.
I’m using Lunarvim but it’s Neovim under the hood, and couldn’t figure out how to access this particular attribute. Thanks!
Good content.