To avoid conflicts with highlighting indentation, I made the highlight line begin after the current indentation.
This works well, except when tabs are used as leading white space.
How could the
my-hl-line-range-function calculate offsets taking tabs into account?
(global-hl-line-mode 1) ;; don't draw over indentation (annoying/distracting with indent guides) (defun my-hl-line-range-function () (cons ;; (point) ;; works nice too, cursor instead of indentation (+ (line-beginning-position 1) (current-indentation)) (line-beginning-position 2))) (setq hl-line-range-function #'my-hl-line-range-function)