2

Is there an non-intrusive way to do this?

demo

I've made a fork of rainbow-mode that uses overlay instead of text properties, which solves this :)

https://github.com/amosbird/rainbow-mode

  • Looking at both packages, hl-line mode uses overlays, and rainbow-mode uses font locking. Overlays always take priority over text properties, so I don't think there is simple solution to this. – Tyler Oct 26 '17 at 16:48
  • I use a custom version of highlight-parentheses (which uses overlays) and it is possible to set its priority overlays to a value higher than hl-line mode. If that interests you, give it a try. If you get stuck, consider opening a new question asking how to do that. – lawlist Oct 26 '17 at 19:02
  • OK. So the only solution to this seems to be an overlay version of rainbow mode. – Amos Oct 27 '17 at 1:53