rainbow-blocks icon indicating copy to clipboard operation
rainbow-blocks copied to clipboard

Merge with intervening faces instead of overriding

Open jonaskoelker opened this issue 8 years ago • 2 comments

Currently, If I do (def one 1), The def part isn't syntax-highlighted as per my major mode (say, clojure-mode). It would be nice if rainbow-blocks would only set those properties I have explicitly defined in the customized faces but not override/replace/whatever those from the major-mode.

The result I'm hoping for is this: have the foreground color of my text be decided by the token type (builtin, string, comment, etc.) and the background be decided by the scope. Currently rainbow-blocks sets both foreground and background based on scope.

jonaskoelker avatar May 23 '16 21:05 jonaskoelker

This would be great, I too would enjoy if keyword faces were highlighted by the major mode and skipped by rainbow-blocks-mode (as if rainbow-blocks-mode painted first, then the major mode painted on top of that).

ahungry avatar Jan 27 '18 04:01 ahungry

I wanted this feature myself, and I ended up making my own package: https://github.com/alphapapa/prism.el It doesn't override existing faces, but adds colors to them, so e.g. bold text remains bold, italic remains italic, etc. You can also use it to set background colors, but it isn't optimized for that case, so it doesn't look real pretty that way.

@istib Thanks for your work on rainbow-blocks, which inspired and helped me with prism!

alphapapa avatar Aug 23 '19 10:08 alphapapa