Theme-able Vim Mode wrapper - #39813
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @WillyHetland on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
| pub struct ThemeColorsContent { | ||
| /// Background color for Vim Normal mode indicator. | ||
| #[serde(rename = "vim.normal.background")] | ||
| pub vim_normal_background: Option<String>, |
There was a problem hiding this comment.
Let's move these to the bottom of the struct.
|
Thanks for this! I like this approach much better than re-using the git status colors; but I'm still concerned about the default un-themed version. Is there a way to build this where the padding doesn't look wrong if the colors are not set (Which will be the default)? I'm not sure we need the I'm also not thrilled by how many variables a theme would have to set to use this, but I think that reflects reality somewhat... |
|
Thanks. It's a bit odd to have the theme change the content, but I think it's the best compromise in this case (until we figure out a better one :D). Would you mind making the CI happy? |
|
I spent a bit more time tidying this up:
|
|
I'm not sure if this error was caused by this change. If you force quit the app, reopening it will retain the insertion mode. 2025-10-28.08.46.35.mov |
Can be replicated in the current release. Don't think its related to this. |
|
This feature is undocumented. Is that intentional? |
Closes [zed-industries#14093](zed-industries#14093) Builds on [zed-industries#32279](zed-industries#32279) by making it theme dependent. Discussion [zed-industries#37816](zed-industries#37816) Wraps the mode label indicator in a div and makes the wrapper and label theme-able. Label weight to medium Mode indicator will render like previously if not theme colors have been set. (i.e., they match zed default- and fallbacks) Really helps with visual confirmation of current mode. _Did not investigate further if there is a way to keep the leading and trailing -- if no theme var given._ Can be applied either by a theme itself or using `theme_overrides` in settings.json Theme colors applied via `theme_overrides` <img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 08" src="https://github.com/user-attachments/assets/a00d9ae4-b6db-46a0-84e2-98d2691a11ad" /> <img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 16" src="https://github.com/user-attachments/assets/f27fddab-524d-43c4-9307-46b6a656cd35" /> <img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 23" src="https://github.com/user-attachments/assets/7e477fff-7a40-4c01-95a7-fbd40fff6caa" /> No theme applied <img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 31" src="https://github.com/user-attachments/assets/8b7b2c75-007b-4074-a552-181c53f31213" /> <img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 36" src="https://github.com/user-attachments/assets/7a708d81-2033-4d72-a844-57607a0434ea" /> <img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 40" src="https://github.com/user-attachments/assets/526f9d10-4d0f-4bc5-af89-31fcca538ce4" /> https://github.com/user-attachments/assets/d0d71d4d-504f-4d18-bbd9-83d3a4b2adb7 Release Notes: - Vim make mode indicator themeable --------- Co-authored-by: willyHetland <willy.hetland@zeekit.no> Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Closes #14093
Builds on #32279 by making it theme dependent.
Discussion #37816
Wraps the mode label indicator in a div and makes the wrapper and label theme-able. Label weight to medium
Mode indicator will render like previously if not theme colors have been set. (i.e., they match zed default- and fallbacks)
Really helps with visual confirmation of current mode.
Did not investigate further if there is a way to keep the leading and trailing -- if no theme var given.
Can be applied either by a theme itself or using
theme_overridesin settings.jsonTheme colors applied via



theme_overridesNo theme applied



vimmodes.mov
Release Notes: