helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
34.08k stars 2.52k forks source link

color-modes = true has no effect when using the default theme #7060

Open thomas-profitt opened 1 year ago

thomas-profitt commented 1 year ago

Summary

There are several themes for which color-modes = true works, and several for which the colors are not defined. It is not unreasonable if not every theme has colors for every feature defined, but they should be defined for the default theme.

Reproduction Steps

Use a theme with the color-modes colors defined (e.g. :theme dracula) and :set color-modes true, then :theme default and see that there are no mode indicator colors defined within that theme.

Platform

Linux

Terminal Emulator

xfce4-terminal

Helix Version

23.05 (7f5940be)

Moanrisy commented 1 year ago

It's not working using inherits theme too

my custom theme

inherits = "sonokai"

# "ui.background" = "white"
# "ui.text" = "yellow"

# [palette]
# white = "#ffffff"
# black = "#000000"

ui.statusline.normal = "#fff"
ui.statusline.insert = "yellow"
ui.statusline.select = "black"

my config.toml

theme = "my-sonokai"

[editor]
line-number = "relative"
auto-save = true
cursorline = true
bufferline = "multiple"
color-modes = true
the-mikedavis commented 1 year ago

The theme scopes need to be wrapped in quotes, for example "ui.statusline.normal"

Moanrisy commented 1 year ago

It's working after wrap it in quotes, thanks.

bajubullet commented 9 months ago

https://github.com/helix-editor/helix/pull/9742