sellout / emacs-color-theme-solarized

Emacs highlighting using Ethan Schoonover’s Solarized color scheme
http://ethanschoonover.com/solarized
MIT License
1.15k stars 201 forks source link

Spaceline customization #183

Open geraldus opened 8 years ago

geraldus commented 8 years ago

I'm user of evil-mode along with spaceline, the latter is a custom theme for powerline similar to Spacemacs' one. I'm facing tiny issue with evil's state colouring: spaceline defines a set of faces for evil-states, all of them are good by default, however all of them have :inherit mode-line attribute at the same time. solarized uses :inverse-video t for mode-line face, and this makes evil state much less apparent. I would be glad to fix all spaceline's face simply reverting :inverse-video attribute if you accept such changes.

Current appearance:

2016-02-20 3 24 18 2016-02-20 3 23 50 2016-02-20 3 23 32

With :inverse-video nil:

2016-02-20 3 40 26 2016-02-20 3 42 34 2016-02-20 3 40 00

Also, same could be done for spaceline-flycheck- faces, this is current apperance:

2016-02-20 3 43 49 2016-02-20 3 44 05

The caveat is that best way to handle all this stuff is to iterate over spaceline's faces applying (set-face-attribute <face> nil :inverse-video nil), because it seems impossible to override :inverse-video only in face definition list. @sellout , what will you say?

sellout commented 8 years ago

Honestly, the :inverse-video t on mode-line (and related faces?) has been a real pain point for me. I think I’d be happy to redefine those to not inverse, but let me think about it a bit.

geraldus commented 8 years ago

Well, I'd vote for not to use invert-video, however in this case we will need somehow make active/inactive mode line more distinguishable, this is standard mode-lines (though with single buffer it looks perfect):

2016-02-20 5 14 31 2016-02-20 5 13 57

Very hard to find which one is active. Also spaceline faces also require some workaround for inactive mode-line:

2016-02-20 5 13 55 2016-02-20 5 14 28

Finally, as for me things are bad in Vim too (especially in light mode):

2016-02-20 5 22 50 2016-02-20 5 23 05

Also, screenshots from Solarized homepage shows that Vim's status line should have base02 background in dark mode and base2 in light mode (this is the second difference I've spotted in addition to newline chars color mismatch, looks like either screenshots are outdates, or current implementation is broken for some reason, anyway I'm care about Vim's version less than about Emacs' one :D)

UPDATE: in case of spaceline with de-inverted video we should fix powerline-inactive-1 face.

geraldus commented 8 years ago

What about changing

which yields:

2016-02-20 6 41 35 2016-02-20 6 41 44
sellout commented 8 years ago

I’m a bit confused here – my emacs looks like the Vim version. When I say we shouldn’t invert, we also need to swap the background/foreground so the appearance is the same, but we achieve that appearance without inverting video. E.g.,

(mode-line (,@fg-base1 ,@bg-base02 ,@fmt-revbb :box nil))

should become

(mode-line (,@fg-base02 ,@bg-base1 ,@fmt-bb :box nil))

(there is no ,@fmt-bb yet, but easy enough to create it.

I inverted the video because that’s the way the Vim theme does it, and I’ve tried to stay faithful to that. But as long as the appearance is the same, I think it’s fine to do it differently.