-
Notifications
You must be signed in to change notification settings - Fork 61
Srcery Next #132
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
Draft
roosta
wants to merge
43
commits into
master
Choose a base branch
from
feat/modernize
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Srcery Next #132
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use the same defined heading colors for markdown and HTML, and what ever else might need headings down the line
avante links to NormalFloat like so many others, in this cause it didn't really work
It will link to `diffRemoved`, which only has `fg` defined, which in turn would result in headings below a certain level would be red. I don't know the rationale linking it to `diffRemoved`, maybe its common to add a background to those groups, i do not know. In lue of colored background shades I set it to `xgray1`, to simulate the effect I see in `render-markdown` `readme` screenshots.
New group introduced that wasn't in sneak previously `SneakCurrent`, I linked it to Search. I don't see any need to differentiate current and other, cursor is already quite visible when using sneak, and if enabling `set cursorline`, it's even more so.
Too much blue
Found 2 to be a bit too bright
Matches macro, which I think is appropriate
Keeping the underline, but differentate from normal text
For consistency, it was blue, not sure about what tree of links got it there, but it was to much, while bright_white is too little.
String is bright green, feels more consistent
Had issues with colors being wrong in nvimpager for certain output, took some serious digging to find any reference to these groups, and the names are a bit odd, I checked the source and they are generated with those names, but I'm worried it'll break, or additional groups are needed.
Commented out groups I suspect aren't needed, but mainly moved stuff around so it made a bit more sense, named sections and not so much deeply nested folds. 1 level is enough IMO. This is a larger effort to normalize the theme any rely on base language groups for most syntax highlighting, making treesitter and regex similar if not exactly the same.
The goal of this commit is to normalize all language hi groups. Instead of specifying a color for each hi group, rely on defaults, or link to base language groups. This makes for easier maintenance, and more consistent colors. Keyword is keyword in any language that links to keyword. I've left links to basegroups if they were present before this refactor, else I've tried to include sane links, but there will be large differences from previous versions
This is a bad idea, when inspecting a hl group in nvim, it'll say that it links to that group, which tells me nothing. For example, I'm investigating why a certain word in a certain language looks the way it looks, then inspecting the word, it'll say its linked to SrceryRed, which is meaningless, I don't actually know which of the base groups are being referenced, it would be any of those having SrceryRed as a base color. I fixed the lightline theme as well because it referenced the same groups. We maintain global variables for color hexes, and the termcolors are always the same so I just referenced those instead.
I kept some of the original bindings for reference where possible.
Setting type to italic by default, don't see a need to optionally set this, we already have an italic toggle, and that should cover this as well.
I think these mostly have been added so that we can reach the special attr (bold, italic etc), but none is the correct way of getting to those arguments There are UI elements that have background set, not gonna touch those for now.
Try to be consistent with ordering, function calls on top, links on bottom. Sorted.
Shouldn't need this, it should have sensible defaults and use basegroups
The inverse options were getting confusing, use instead one var to control whether inverse is used or not. Ad BREAKING CHANGE: Removes options srcery_inverse_matches, srcery_inverse_match_paren.
This only works in regular vim, not nvim, so for the sake of consistency lets keep it the same across envs
The functionality has been removed in a prev commit, this officially removes the non-functioning opt
I plan on having a separate transparent opt, instead of mixing the two. Also rename it to srcery_background rather than bg for clearity
This needs to exist, there are plugins that work well with srcery color for NormalFloat and then there are those that don't, it has to be down to preference.
Change the background to a darker variant of the original, I then created shades by mixing in white to create alternative xgray[n] variants. The new background was chosen so that the colors pop a bit more, trying out srcery on various monitors of often looked washed out. I've also gotten my hands on a much better monitor, so I'm more able to accurately cover multiple various outputs.
These plugins haven't worked in this branch for a while, the old memoize groups are no more. Fix some atrocious formatting as well in the airline theme, think this one's been through a few formatters.
ac7c7d1
to
02d2059
Compare
Change search indicators to magenta, which works well on inverse and not. We also don't need a cond anymore because setting both background and special will work as expected when turning off inverse, it will then fall back to the background.
The magenta was too distracting, I've reverted it back to s:none, but kept the underline. Set cur/inc search to have a gray4 background.
conflicted with visual when inverse is disabled
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Srcery Next
This PR aims to enhance compatibility with modern (neo)vim features, normalize
color usages, and includes palette changes.
Changes
Use base color groups and links instead of defining each color individually.
A
function
should look like afunction
in all languages where that makes sense.Removed "memoize" groups (
SrceryRed
,SrceryBlack
etc) that made debuggingdifficult (when
:Inspect
a highlight group, it would link to something likeSrceryRed
rather than a meaningful base group) (d2dd4cf)Aligned Treesitter highlighting with traditional regex matching for consistent
appearance
Removed a excessive highlight groups for languages and plugins. It should be
assumed that mostly sane defaults are enough.
Normal float is now behind an option
g:srcery_normal_float
, setting itto 1 will use a custom background for popup windows. (3b0f594)
Simplify background option, this was getting needlessly complicated, I will
move the transparent background functionality to a separate option. (fefcf26)
Remove
dim_lisp_paren
(e61197),hard_black_terminal_bg
(20bfd94), anditalic_types
, the type will still be italic, just no opt.Join all inverse options into a single option, which controls all inverse usages (df8fa8d)
Additionally many group and link changes here and there, to many to keep
track of, but I've tried to remain consistent...
Fixed
nvimpager
colors not usingsrcery
, see 911a858 for detailsgroup (
SneakCurrent
) needed to be linked toCurSearch
, else it defaultedto hardcoded hex
Chore
I've also cleaned out a lot comments as well, a quick SHIFT+K will
sooner explain the group better than most of those comments.
Color changes
Relying on xterm colors are not as useful anymore as most modern terminals
support true color, same as (neo)vim, so I took a crack at designing some new
shades, that includes
[bright]white
,[bright]black
, and all thexgray[1-6]
, now just namedgray[1-6]
. The old background is accessible viagray1
The new shades are based on a darkened version of the original background
color, chosen because I felt the old one looked a bit washed out TBH.
The actual colors, red, green etc remain unchanged for now.
Sample Screenshots
TODOs
EDIT 2025-08-27: Rewrote and reorganized PR description