Skip to content

Srcery Next#132

Draft
roosta wants to merge 73 commits intomasterfrom
feat/modernize
Draft

Srcery Next#132
roosta wants to merge 73 commits intomasterfrom
feat/modernize

Conversation

@roosta
Copy link
Copy Markdown
Member

@roosta roosta commented Apr 10, 2025

Srcery Next

This PR aims to enhance compatibility with modern (neo)vim features, normalize
color usages, and includes palette changes.

C Rust Python Typescript Popup
Dignostic Diff View Markdown Terminal

Changes

  • Use base color groups and links instead of defining each color individually.
    A function should look like a function in all languages where that makes sense.

  • Removed "memoize" groups (SrceryRed, SrceryBlack etc) that made debugging
    difficult (when :Inspect a highlight group, it would link to something like
    SrceryRed 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 it
    to 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), and
    italic_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

  • Fix an issue with nvimpager colors not using srcery, see 911a858 for details
  • Fix an issue with sneak, where a new
    group (SneakCurrent) needed to be linked to CurSearch, else it defaulted
    to hardcoded hex
  • Viewing diffs are now greatly improved with proper word diff highlighting using the new dark_green, dark_red, and dim_green (059b4aa)
  • Improve win splits by using a grey accent color instead of bright_white

Chore

  • Reorganize the code into more meaningful sections with less nesting/folding.
    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 the
xgray[1-6], now just named gray[1-6]. The old background is accessible via
gray1

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.

TODOs

  • Screenshots
  • Documentation
  • Possibly removal of some old config options. Open for discussion here.

EDIT 2025-08-27: Rewrote and reorganized PR description
EDIT 2026-04-19: Added new screenshots, new fixes

@roosta roosta changed the title Feat/modernize Srcery Next Aug 27, 2025
roosta added 24 commits April 18, 2026 12:58
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.
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.
roosta added 9 commits April 18, 2026 12:58
I's supposed to be non text, but often used for text nevertheless, so
this increases legibility
Update the readme to match the new options, also lots of old stuff that
isn't relevant anymore could be cleanup. I've adjusted the badges a bit
and I got rid of the color table. Its just noise and not important for
most users, so I got rid of it

Rewrote attribution, description, added lazy instructions, remove TOC.
Change options to a table, add license section
Rewrote some sections, fixed typos, add missing option, add lua examples
Dark_blue is not in the json palette yet, or at least not in any
published version of it yet
roosta added 20 commits April 18, 2026 13:38
bright white is a bit much, possibly add some opts for this
Previous implementation colored the foreground of diffs, and didn't make
it clear where the changes was. This uses the new dark and dim colors to
improve diff readability, especially word diff
Created new screenshots the presents a bit better, trying to showcase as
many features as I can
Users probably only need one of them, and it cleans up the readme a bit
Just now confirmed it does work, not sure if every UI element is accounted
for, some maybe should be transparent but isn't.
My kitty term doesn't export TERM_ITALICS, and most terminal emulators
ive ever used, even back in the xorg days supports italic, not sure if
there is a reliable way to check for this in every terminal, and if we
even should. Leave it as a user preference.
Considering making it even simpler as two of the three statusline
plugins load the theme automatically.

I also fixed a few typos and formatting issues
Felt folds got a need unnecessary, as there is just one statusline that
needs configuration, the others load automatically.
I feel setting the var like this is slightly more idiomatic, and less
confusing. Add some text formatting to table, shame I cant get
undercurl.
This is an xterm color at index 30, and it isn't used anywhere in the
theme yet, but it is defined in the palette package, and is used some
other places where extra colors are needed (ls colors for example, where
teal typically signify a directory)
Handy with a full list, but keep it hidden by default
Leave pmenu as is, NormalFloat was to bright, but the pmenu need to stick out a
bit more.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant