Skip to content

Commit

Permalink
fix: register default color theme before render (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
erha19 authored Dec 29, 2021
1 parent f885ffa commit 423ea3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/theme/src/browser/theme.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
import { Autowired } from '@opensumi/di';
import { MenuContribution, IMenuRegistry, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
import { ISemanticTokenRegistry, ProbeScope } from '../common/semantic-tokens-registry';
import { COLOR_THEME_SETTING } from './workbench.theme.service';

export const THEME_TOGGLE_COMMAND: Command = {
id: 'theme.toggle',
Expand Down Expand Up @@ -56,11 +55,16 @@ export class ThemeContribution implements MenuContribution, CommandContribution,
protected readonly semanticTokenRegistry: ISemanticTokenRegistry;

initialize() {
this.registerDefaultColorTheme();
this.registerDefaultTokenStyles();
this.registerDefaultTokenType();
this.registerDefaultTokenModifier();
}

private registerDefaultColorTheme() {
this.themeService.applyTheme(DEFAULT_THEME_ID);
}

private registerDefaultTokenModifier() {
this.semanticTokenRegistry.registerTokenModifier(
'declaration',
Expand Down

0 comments on commit 423ea3a

Please sign in to comment.