Skip to content

shortcut and dimmed colors are being assigned before configuration is loaded #181

@PrayagS

Description

@PrayagS

I was going through recent changes and noticed that I can set the colors for shortcut and dimmed. Commit: ecf90ad

I tried the following in my configuration to test,

[ui.colors.shortcut]
fg = "#123456"
bg = "#ffffff"
bold = true

[ui.colors.dimmed]
fg = "#123456"
bg = "#ffffff"
bold = true

This didn't work. After adding some logs, I noticed that the place where the palette is being initialized,

p.Dimmed = createStyleFrom(config.Current.UI.Colors.Dimmed)
p.Shortcut = createStyleFrom(config.Current.UI.Colors.Shortcut)

is called in the path of,

appContext := context.NewAppContext(rootLocation)

which is being called before loading the user's configuration.

Is this observation correct or am I not configuring this correctly? When I check the value of this color inside the palette update function and after loading the config, they're different as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions