Skip to content

Apply themes on startup if settings changed while VSCode was closed#22

Open
asrma7 wants to merge 1 commit into
rakibdev:mainfrom
asrma7:main
Open

Apply themes on startup if settings changed while VSCode was closed#22
asrma7 wants to merge 1 commit into
rakibdev:mainfrom
asrma7:main

Conversation

@asrma7

@asrma7 asrma7 commented Jun 11, 2026

Copy link
Copy Markdown

Fixes #21.

updateThemes() is only called inside onDidChangeConfiguration, which doesn't fire on startup and only runs while VSCode is already open. So if an external tool like Matugen updates material-code.colors while VSCode is closed, the new colors are never applied on the next launch even though settings.json is correct.

This adds a settings hash check on activation. The hash covers the same four theme-related config keys already checked by onDidChangeConfiguration and is persisted via AppData. On startup, if the hash differs from the last session, updateThemes() runs in the background. The hash is also kept in sync inside onDidChangeConfiguration so subsequent cold starts don't redundantly rewrite the theme files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Color change does not reflect when vscode is not running

1 participant