Replies: 5 comments 3 replies
-
|
Parts of the theme like the cursor can already be customized by mode: https://docs.helix-editor.com/master/themes.html#interface It seems unnecessary to me to be able to change the entire theme on mode switch |
Beta Was this translation helpful? Give feedback.
-
|
I'm aware of the cursor setting at present and it's certainly useful. My own personal preference is to have a different background in insert mode just so it is very clear visually which mode I'm in. So I could have proposed to add a Just having a theme override for insert mode seemed like the least work that provides the most functionality. Especially since themes can already specify a base theme it should make it fairly approachable for anyone to tweak their current theme for insert mode. There is certainly room for debate over whether having things like the cursor insert formatting should be taken out of the base theme and put into a derived theme but I suspect having to have two versions of every theme would feel a bit bloated. I suspect having that setting in the base theme is probably a bare minimum necessary to make working themes for a modal editor (even if some themes don't use them) but I don't really see any downside in allowing people to tweak the visual distinction between modes to their hearts content if they so choose. |
Beta Was this translation helpful? Give feedback.
-
|
Also, there is a [editor]
"color-modes" = true |
Beta Was this translation helpful? Give feedback.
-
|
I also need this, I know we can theme the cursor, but still I sometimes I am forgetting which mode I am in. The background color will be zero cognitive load indicator that yes, you are in normal mode, or insert mode, or select mode. I think this is more than a just cosmetic feature and something that will truly elevate Helix's experience for me. But on a lower priority note, if we implement this, I hope we can also add semi-transparent backgrounds, because I like to keep the background transparent. A tinted background color change based on the mode would be perfect. |
Beta Was this translation helpful? Give feedback.
-
|
I think I largely agree with @eamonno in terms of motivation. I used to agree on approach too. But after trying to implement it for a bit.. I now think the best course of action is not to add On a user side, the theme picker doesn't make sense with a theme per mode approach and possibly becomes config dependent. When you have one theme does it match the current behavior? What about when you have a theme set for each mode? Does it just pick for the current mode? Overwrite all of them? From a code perspective my approach ended up with a bunch of duplicated code, despite this being one of my concerns going in and me putting my best efforts into avoiding it. I think with a bit of effort it wouldn't be too hard to simply expand the current behavior and simplify it, and I think it would be a little cleaner since we scatter this logic around the editor and I think it could be all in the theme.rs file. I'm currently working on this and I'll reply back here with a pull request. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Add the following config options.
The logic is that each of these default to the value of
themebut if set override the global theme in that mode. The logic should be pretty straightforward to do as it's just replacing the global theme depending on mode.You could in theory do the same for selects but my understanding is that since selects can be present in either mode it would be all but impossible to make it behave in a way that works on terminals where you don't get to have extra colours and it would be a lot of extra work for little benefit.
Beta Was this translation helpful? Give feedback.
All reactions