-
Notifications
You must be signed in to change notification settings - Fork 3
Home
shrynx edited this page Apr 21, 2025
·
1 revision
A Neovim plugin to display both relative and absolute line numbers side-by-side using the statuscolumn feature (requires Neovim 0.9+).
- Show relative, absolute, both, or no line numbers
- Configurable format (
abs_relorrel_abs) - Custom separator between numbers
- Highlight groups for styling relative and absolute numbers
- Lightweight and Lua-only

- Neovim >= 0.10.0
-
lazy.nvim plugin manager
- OR a plugin manager that uses Neovim's native package system
With lazy.nvim:
{
"shrynx/line-numbers.nvim",
opts = {},
}With packer.nvim:
use({
"shrynx/line-numbers.nvim",
config = function()
require("line-numbers").setup({})
end
})All the options are optional and below are the defaults.
{
mode = "both", -- "relative", "absolute", "both", "none"
format = "abs_rel", -- or "rel_abs"
separator = " ",
rel_highlight = { link = "LineNr" },
abs_highlight = { link = "LineNr" },
}- :LineNumberToggle
- :LineNumberRelative
- :LineNumberAbsolute
- :LineNumberBoth
- :LineNumberNone
After installation, run:
:helptags ~/.local/share/nvim/lazy/line-numbers.nvim/doc:help line-numbers