Skip to content

vim: Add configurable yank highlight background color#49517

Merged
dinocosta merged 2 commits intozed-industries:mainfrom
kaspernyhus:feature/yank-color
Feb 26, 2026
Merged

vim: Add configurable yank highlight background color#49517
dinocosta merged 2 commits intozed-industries:mainfrom
kaspernyhus:feature/yank-color

Conversation

@kaspernyhus
Copy link
Copy Markdown
Contributor

@kaspernyhus kaspernyhus commented Feb 18, 2026

Make the vim yank background highlight color configurable as "vim.yank.background".

  "theme_overrides": {
    "Gruvbox Material": {
      "vim.yank.background": "#FE7F1F",
    }
  },
zed_yank_color

Currently the yank highlighting is hardcoded to editor.document_highlight.read_background making it impossible to configure a separate color for highlighting when yanking.

Release Notes:

  • Added configurable vim.yank.background theme color for vim yank highlight

Make the vim yank background color configurable as
"vim.yank.background".
@kaspernyhus kaspernyhus requested review from a team as code owners February 18, 2026 19:03
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 18, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Feb 18, 2026
@maxdeviant maxdeviant changed the title vim: add configurable yank highlight background color vim: Add configurable yank highlight background color Feb 18, 2026
* Update theme importer to map the `vim_yank_background` color to the VS
  Code's `editor.rangeHighlightBackground` color. This is not set in
  stone, but taking a quick look at the list of available colors for a
  theme, this one seems to make sense.
* Update `theme::schema::theme_colors_refinement` such that, if a theme
  does not define the `vim.yank.background` color, it'll default to the
  `editor.document_highlight.read_background` color, which it was
  already using before these changes.
Copy link
Copy Markdown
Member

@dinocosta dinocosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kaspernyhus ! 🙂

I've pushed a smaller commit updating the VS Code theme importer, as well as the fallback color when a theme does not define the vim.yank.background color – b90e5ce .

@dinocosta dinocosta merged commit bf6a737 into zed-industries:main Feb 26, 2026
27 checks passed
rtfeldman pushed a commit that referenced this pull request Feb 27, 2026
* Add a dedicated `vim.yank.background` theme color for the yank
  highlight, which was previously hardcoded to
  `editor.document_highlight.read_background`.
* When a theme doesn't define `vim.yank.background`, it falls back to
  `editor.document_highlight.read_background` for backwards
  compatibility.
* The VS Code theme importer maps `editor.rangeHighlightBackground` to
  this new color.

Release Notes:

- Added configurable `vim.yank.background` theme color for vim yank
  background highlight

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
…#49517)

* Add a dedicated `vim.yank.background` theme color for the yank
  highlight, which was previously hardcoded to
  `editor.document_highlight.read_background`.
* When a theme doesn't define `vim.yank.background`, it falls back to
  `editor.document_highlight.read_background` for backwards
  compatibility.
* The VS Code theme importer maps `editor.rangeHighlightBackground` to
  this new color.

Release Notes:

- Added configurable `vim.yank.background` theme color for vim yank
  background highlight

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants