Looking to set relative line numbers when in programming modes. Looking through the older posts I see a way to set line numbers based on the mode - How do I display line numbers in emacs (not in the mode line)? :
(add-hook 'prog-mode-hook 'linum-mode)
(setq-default display-line-numbers 'relative) in my init file for relative line numbers, however, would like to use this setting on a per mode basis partially all programming modes.