Detailed changes
@@ -1033,6 +1033,9 @@ pub struct ThemeColorsContent {
/// Background color for Vim Visual Block mode indicator.
#[serde(rename = "vim.visual_block.background")]
pub vim_visual_block_background: Option<String>,
+ /// Background color for Vim yank highlight.
+ #[serde(rename = "vim.yank.background")]
+ pub vim_yank_background: Option<String>,
/// Background color for Vim Helix Normal mode indicator.
#[serde(rename = "vim.helix_normal.background")]
pub vim_helix_normal_background: Option<String>,
@@ -175,6 +175,7 @@ impl ThemeColors {
vim_visual_background: system.transparent,
vim_visual_line_background: system.transparent,
vim_visual_block_background: system.transparent,
+ vim_yank_background: neutral().light_alpha().step_3(),
vim_helix_normal_background: system.transparent,
vim_helix_select_background: system.transparent,
vim_normal_foreground: system.transparent,
@@ -320,6 +321,7 @@ impl ThemeColors {
vim_visual_background: system.transparent,
vim_visual_line_background: system.transparent,
vim_visual_block_background: system.transparent,
+ vim_yank_background: neutral().dark_alpha().step_4(),
vim_helix_normal_background: system.transparent,
vim_helix_select_background: system.transparent,
vim_normal_foreground: system.transparent,
@@ -257,6 +257,7 @@ pub(crate) fn zed_default_dark() -> Theme {
vim_visual_background: SystemColors::default().transparent,
vim_visual_line_background: SystemColors::default().transparent,
vim_visual_block_background: SystemColors::default().transparent,
+ vim_yank_background: hsla(207.8 / 360., 81. / 100., 66. / 100., 0.2),
vim_helix_normal_background: SystemColors::default().transparent,
vim_helix_select_background: SystemColors::default().transparent,
vim_normal_foreground: SystemColors::default().transparent,
@@ -796,6 +796,11 @@ pub fn theme_colors_refinement(
.vim_visual_block_background
.as_ref()
.and_then(|color| try_parse_color(color).ok()),
+ vim_yank_background: this
+ .vim_yank_background
+ .as_ref()
+ .and_then(|color| try_parse_color(color).ok())
+ .or(editor_document_highlight_read_background),
vim_helix_normal_background: this
.vim_helix_normal_background
.as_ref()
@@ -175,6 +175,8 @@ pub struct ThemeColors {
pub vim_visual_line_background: Hsla,
/// Background color for Vim Visual Block mode indicator.
pub vim_visual_block_background: Hsla,
+ /// Background color for Vim yank highlight.
+ pub vim_yank_background: Hsla,
/// Background color for Vim Helix Normal mode indicator.
pub vim_helix_normal_background: Hsla,
/// Background color for Vim Helix Select mode indicator.
@@ -207,6 +207,7 @@ impl VsCodeThemeConverter {
terminal_ansi_white: vscode_colors.terminal.ansi_white.clone(),
terminal_ansi_bright_white: vscode_colors.terminal.ansi_bright_white.clone(),
link_text_hover: vscode_colors.text_link.active_foreground.clone(),
+ vim_yank_background: vscode_colors.editor.range_highlight_background.clone(),
..Default::default()
})
}
@@ -228,7 +228,7 @@ impl Vim {
editor.highlight_background(
HighlightKey::HighlightOnYank,
&ranges_to_highlight,
- |_, colors| colors.colors().editor_document_highlight_read_background,
+ |_, colors| colors.colors().vim_yank_background,
cx,
);
cx.spawn(async move |this, cx| {