-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
feat(highlight): update default color scheme #26334
Conversation
Let's move quickly on this, @echasnovski you've been a heroic custodian of this topic, and it's a 2-way door--this is a good foundation for future improvements. Thank you! Some minor requests:
Yes. We should also consider bg that is closer black/white.
Definitely not a blocker, though I'll mention that years ago I had yellow
We can ship the old Vim colors as a builtin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 Let's do it
Thanks for approving!
Will do!
Not sure what to do extra here. There seems to be only one group related to linking (
I basically chose lightness 13 from the reference Basically, it should be too dark because background for floating windows are darker than normal background. So to make them visually separable, it shouldn't be too black/white. Of course, floating windows can be made lighter than normal (essentially switch normal and floating backgrounds), but it would mean that PMenu and That said, all colors already meet standards outlined at the beginning (except cyan text for light theme, but that is because there isn't really such thing as "dark saturated cyan").
That certainly makes things easier! I am still committed to update all tests to make them proper if general core consensus decides so. |
I agree with this plan. Updating the tests should be done eventually, but it will be a huge project, and it is better to unblock this PR by using |
This seems like a controversial feature. Maybe we should wait for more approvals before moving forward with this? |
Don’t forget a news.txt entry. |
And 'vim_diff.txt', yes. |
7266a64
to
1ae7898
Compare
I have force pushed the changes. In actual color scheme I only changed There are still failing tests which I'd need help resolving, as they are somewhat too deep into source and test code. I'll try figuring something out. Otherwise, documentation should be all which requested. |
1ae7898
to
583f1b3
Compare
Also needs |
583f1b3
to
f8277de
Compare
Thank you, @echasnovski, for your hard work and patience in seeing this through! What a lovely (early) birthday present :) |
|
||
" This is the default color scheme. It doesn't define the Normal | ||
" highlighting, it uses whatever the colors used to be. | ||
" This is the default color scheme. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should mention something like
See :help dev_theme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention the Nvim*
colors at :help gui-colors
?
Relates to default colorscheme change in neovim [#26334](neovim/neovim#26334)
Relates to default colorscheme change in neovim [#26334](neovim/neovim#26334)
UpdateThe below comment appears to be specific to the colorscheme. I can't reproduce the behaviour with catppuccin. I've noticed some broken tree-sitter highlighting and git bisected it to this PR. Specifically, Neovim used to highlight according to the last match in the highlights.scm file. Before this PR:Notice how After this PR:Now I'm not sure if this is known, and if there's already an issue for it (I couldn't find one). |
Yes, treesitter groups have yet to be adapted; that is ongoing work (please read the description and open issues and PRs) Friendly reminder: master is not guaranteed to be usable, if greater changes need to be carried out across multiple PRs. |
2023-12-16 Edit: #26540 introduced some tweaks to the default color scheme based on the feedback. In particular, screenshots, palettes, and contrast ratios listed in this PR are now not up to date.
This PR addresses a long standing issue of suboptimal default color scheme. Here is the outline of what it proposes.
Design
notermguicolors
(256 colors) while allowing a bit more shades for whentermguicolors
is set (true colors). I really hope that this compromise will allow to coexist extreme minimalism of reference colors and a bit more variety with true colors.Normal
highlight group and 4.5 for some common cases (Visual
,Comment
with set 'cursorline', colored syntax,Diff*
,Search
).Palette
NvimDark*
) and light (NvimLight*
).termguicolors
- shades of "cool" grey.NormalFloat
(considered as "black"),Normal
(background),CursorLine
,Visual
.Comment
,StatusLine
/TabLine
,Normal
(foreground), and color considered as "white".All colors are procedurally and objectively generated based on a handful of hyperparameters. Here is a link to the script (to run, it requires 'mini.colors' dependency).
Here is the data about palettes:
Hex palettes
256 colors palettes
Contrast ratios
dark_*
are for dark color scheme,ligth_*
- for light.Highlight groups
Statement
highlight group). This is an important choice to increase accessibility for people with color deficiencies, as it doesn't rely on actual color.DiffAdd
(as background),DiagnosticOK
, and some minor text UI elements.Function
),DiffText
,DiagnosticInfo
(andDiagnosticHint
in 256 colors), and some minor text UI elements.ErrorMsg
,DiffDelete
,DiagnosticError
.WarningMsg
, andDiagnosticWarn
. With 256 colors it falls back to red. One important exception to this isSearch
which has yellow background.Identifier
only with true colors. This gets used quite a lot, so it does not have fallback for 256 colors (to reduce noise).Here are screenshots in many situations:
Screenshots
Dark, 256 colors:
Dark, 256 colors, diff:
Dark, 256 colors, tree-sitter:
Dark, 256 colors, tree-sitter + LSP:
Dark, true colors:
Dark, true colors, diff:
Dark, true colors, tree-sitter:
Dark, true colors, tree-sitter+LSP:
Light, 256 colors:
Light, 256 colors, diff:
Light, 256 colors, tree-sitter:
Light, 256 colors, tree-sitter + LSP:
Light, true colors:
Light, true colors, diff:
Light, true colors, tree-sitter:
Light, true colors, tree-sitter+LSP:
@justinmk, as you are the one making merging decision, I am mentioning you here. To be fully upfront, here are the changes which I think you might not like (yet I still ask you to try them and reconsider):
Search
has yellow background. I tried various combinations, but having any other basic color (grey, green, cyan) as background will blend in more than it should. I triedreverse=true
, but it looks not really good and has issue with not visible cursor (which is very often also reversed).Search
makes sense.Diagnostic*Warn
,SpellCap
) and blue colors added withtermguicolors
. See screenshots.Diff*
colors come from "background" palette. Those have similar lightness to background and stand out mostly via saturation (and not saturation + lightness). Reference examples in defaults: improved default color scheme #14790 didn't have such colors available, so I decided to try them here. They do look good.I would like this to be a present to Neovim for its 10-th anniversary (which is in two months, according to 72cf89b). Hope to have a discussion with eventual green light on actual color scheme being mergeable. After that I'll fix (probably literal) hundreds of failing tests (I patched some hanging ones, but couldn't see the finish of
make test
due to timeout).Fixes #14790.
Resolves #24253.