For the life of me I can’t turn off relative line numbers.
Sure when I type :lua vim.opt.relativenumber = false it turns them to absolute numbering, but then when I switch windows it goes right back to relative line numbers being true.
I don’t mean to offend anyone here, but I can’t stand relative line numbers. So I changed my init.lua to just be
You can also inspect those autocommands by dumping the output with verbose autocmd BufEnter and verbose autocmd WinEnter. You could even put them into a buffer like this:
" Create a new buffer
bufnew
" Redirect all messages to `g:output`
redir => g:output
silent verbose autocmd BufEnter
silent verbose autocmd WinEnter
redir END
" Paste the contents of g:output into the buffer
put =g:output
Then you can search the output with something like /rnu\|relativenumber to see if any of the autocommands modify that setting.
relativenumber is disabled by default in nvim so it could be some plugin that is enabling it or somewhere in your config that you might’ve missed.
You can do :verbose set relativenumber? to check from where it was set from, but sometimes it doesn’t give great information if it was set from a lua file.
A better way would be to use the builtin :vimgrep to check for any references of relativenumber or rnu (its short name) within your config dir:
I think the toughest thing about nvim is the LARGE temptation of choosing someone else’s set of plugins and then not combing through it before starting to use them. There are some great “sets” out there though. One of these days I want to compare and contrast them all.