Coder Social home page Coder Social logo

Comments (12)

gegoune avatar gegoune commented on July 20, 2024 2

I don't think you should stress too much about what it looks like per colorscheme. There is absolutely no way you can support all colorschemes, as a matter of a fact it should be other way around - colorschemes should support your plugin and override default highlight groups it provides.

Come up with very neutral, non aggressive defaults and be done with it, I don't think any configuration flags should be provided here. If someone wants to disable specific highlighting they can do that by overriding it accordingly.

from neogit.

RianFuro avatar RianFuro commented on July 20, 2024 1

@TimUntersberger The problem is that we can't really do the right thing in this regard, someones color scheme will always look off with the provided colors.
I mean sure, we could add in a flag to only style the foreground if set, but then do we also add a flag to invert diff add/delete highlighting to better match colorschemes like onedark and nord? What about light themes where the provided highlighting would likely be too dark? I wonder where we would draw the line between providing configuration via flags and just letting the user override the highlight groups.

On that note, maybe we should also add overrides for the most popular color schemes to our repo? Or at least accept pull requests for that so other users don't have to worry about it. EDIT: scratch that, the after/colors directory sadly doesn't work as expected, so we can't easily extend colorschemes on our own anyway.

from neogit.

RianFuro avatar RianFuro commented on July 20, 2024

Huh, that would be the contextual highlighting not working well with your color scheme. It changes not because of the scrolling but your cursor moving into that region.
Basically, we have our own set of highlights for that since there's not really an equivalent in the defaults, so we just chose a set of greyscales.
You can check the readme on how to adapt those to your color scheme.

That being said, we probably should adapt the default highlighting to include fg colors, so it's at least readable.

from neogit.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

@RianFuro it looks like the diff lines also have their color changed. I don't think this happens on my machine if I remember correctly.

from neogit.

RianFuro avatar RianFuro commented on July 20, 2024

@TimUntersberger We style the background since the expect the foreground to be highlighted red/green. With onedark the foreground is dark while the background is highlighted red/green. That's why the it looks off in his style, while it doesn't for me and you.

from neogit.

RianFuro avatar RianFuro commented on July 20, 2024

Alright, so I added some foreground colors to the highlights to make sure they are legible, no matter the user's colorscheme. I think that's as far as we can go on that matter, since we cannot possibly accommodate for all possible colorschemes out there; adaptions for that would need to go into the respective colorscheme plugin (even though I think we're not big enough to warrant that yet).

from neogit.

Shatur avatar Shatur commented on July 20, 2024

@RianFuro, is there a way to disable this feature? It looks weird with my colorscheme too:
Without highlighting:
image
With highlighting:
image

from neogit.

RianFuro avatar RianFuro commented on July 20, 2024

@Shatur95 There isn't as of right now, but we really should have that option so I'll add that in.
That being said, you can just check the README.md for which highlighting groups we are using and override those to match your colorscheme. In my experience the context highlight really helps when staging unstaging, as it shows you exactly what you're affecting.

from neogit.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

@RianFuro Tbh I dislike the new change too. If possible we should probably keep the old behaviour and have a flag for foreground colors.

from neogit.

RianFuro avatar RianFuro commented on July 20, 2024

@Shatur95 just pushed an update, you can now set disable_context_highlighting = true in your setup call to completely disable context highlighting

from neogit.

Shatur avatar Shatur commented on July 20, 2024

@RianFuro, thank you!

from neogit.

Shatur avatar Shatur commented on July 20, 2024

@RianFuro, What if use CursorLine for it by default? Should looks awesome for any theme.

from neogit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.