To enable relative line number, add the following line to your init.lua.

vim.wo.relativenumber = trueCode 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 compiled a list of software and services that I use to improve my workflow, here is the link to the list.

Darryl Dias

I’m Darryl. I’m a 3D Artist, Programmer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.