Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to use own colorscheme, but little darkened? #2

Open
ReneFroger opened this issue May 20, 2015 · 5 comments
Open

Being able to use own colorscheme, but little darkened? #2

ReneFroger opened this issue May 20, 2015 · 5 comments

Comments

@ReneFroger
Copy link

Thanks for sharing this plugin, it's appreciated. It reminds me of LimeLight.

But I found it hard to read other syntax color when it's not lightened up, and navigate it every time to see the syntax highlighting.

Would it not be a great idea, to use the according colorscheme, but a little darkened (like 80% of opacitiy, while focus have 100% opacitiy), instead convert the non-focus text to one color?

@larstvei
Copy link
Owner

Hi!

This would be cool (and the thought has crossed my mind), but I'm not sure how to implement it. The current approach is to use a simple overlay in unfocused sections; this is simple and efficient. The color is determined by what color you foreground/background is, along with the focus-dimness customizable variable.

The only idea I have on how to do this would require to make an overlay for each character (worst case) in the buffer, and this does not seem like sound approach. If you (or someone else) have an idea on how to implement this efficiently I'd gladly try to implement it!

I was not familiar with LimeLight, looks like something Vim'ers would enjoy 👍

Thanks for sharing your idea; I hope I'll be able to add it eventually!

@xobzoo
Copy link

xobzoo commented Jan 23, 2020

I just discovered focus today (as I was reviewing the things recently added to melpa) and I like the idea behind it. Although I think it doesn't work as I would like in org-mode, it seems to be correct enough for programing modes.

However, as noted in this issue, I want to keep the coloration in the rest of my buffer, just faded. (although having an option to completely gray everything out is a nice idea) Anyway, I remembered just barely reading that dimmer claims to work the way we want:

This package provides a minor mode that indicates which buffer is currently active by dimming the faces in the other buffers. It does this nondestructively, and computes the dimmed faces dynamically such that your overall color scheme is shown in a muted form without requiring you to define what is a "dim" version of every face.

I haven't yet looked at implementation details of either one (dimmer and focus) to see how they're implemented, so maybe there isn't enough in common to make it easy. (I don't even really know how faces work.) But maybe it's the awesome breakthrough that makes everything easy?

@larstvei
Copy link
Owner

Thank you @xobzoo, I didn't know about dimmer! I haven't looked too closely at the implementation yet, but it shows that it's possible to achieve (and the code does not look scary at first glance). This leaves me with no excuse to not implement this, other than the general "I don't have time" excuses. So with any luck, this issue can be closed soon 🙂

@larstvei
Copy link
Owner

larstvei commented Mar 8, 2020

I'm glad to finally make some progress on this, five years after it was opened! Could anyone test #23?

@Shooooooooo
Copy link

Works for me in general. A bit laggy and temporary wrong color when scrolling. (P.S. I tested with TTY)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants