2

I am using (global-display-line-numbers-mode) and the code suggested in https://unix.stackexchange.com/a/593889/441805 adapts the line numbers column font scale accordingly to the buffer text font scale

(defun post-text-scale-callback ()
  ;; fix line number text size
  (set-face-attribute 'line-number nil 
                      :height (floor (* (face-attribute 'default :height)
                                        (expt text-scale-mode-step text-scale-mode-amount)))))
(add-hook 'text-scale-mode-hook 'post-text-scale-callback)

but this has the drawback that the line numbers column font scale changes in every buffer now. I am using emacs 28.0.50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.