Comments (12)
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.
@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.
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.
@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.
@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.
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.
@RianFuro, is there a way to disable this feature? It looks weird with my colorscheme too:
Without highlighting:
With highlighting:
from neogit.
@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.
@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.
@Shatur95 just pushed an update, you can now set disable_context_highlighting = true
in your setup call to completely disable context highlighting
from neogit.
@RianFuro, thank you!
from neogit.
@RianFuro, What if use CursorLine
for it by default? Should looks awesome for any theme.
from neogit.
Related Issues (20)
- un staged files showing folded without filename by default HOT 6
- Latest commit broke with `attempt to call field 'system' (a nil value)` HOT 4
- `ZZ`/`ZQ` shortcuts for rebase message editor HOT 1
- Neogit doesn't work anymore with latest commit and default config HOT 1
- [Bug] Issues with keymaps persist HOT 6
- No way to manually open console HOT 5
- Feature request: Set buffer options in gitcommit/NeogitCommitMessage filetype
- Attempt to index local 'diff' (a nil value) HOT 4
- Opening Neogit: bisect.lua:91: Attempt to index local 'oid' (a nil value) HOT 1
- Status not being automatically refreshed when staging / unstaging / commiting / pushing on Windows HOT 27
- Neogit misreads Nvim version HOT 1
- Support to custom keymap for navigation? (h,j,k,l)
- Can't unmap "u" key in status HOT 5
- Add Diff Arguments Support
- Push refspec support HOT 1
- issue with kind=replace HOT 5
- Using the default config from README.md does not work HOT 1
- vim.wait must not be called in a lua loop callback HOT 13
- Open Current Branch in Browser HOT 1
- Using ":Neogit branch" to create a branch leads to error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neogit.