Skip to content

Commit 6b1d5a6

Browse files
committed
feat: Add missing semanticHighlighting flag in themes
1 parent f09b0db commit 6b1d5a6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/theme/defaultTheme.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@
342342
// "tree.indentGuidesStroke": "#a9a9a9",
343343
//"widget.shadow": "#a8a8a8"
344344
},
345+
"semanticHighlighting": true,
345346
"semanticTokenColors": {
346347
"*.static":{
347348
"fontStyle": "italic"

src/theme/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export async function addVSCodeTheme (name: string, vscodeTheme: IVSCodeTheme):
3636
...convertTheme(fixVSCodeThemeColors(vscodeTheme)),
3737
encodedTokensColors: themeData.tokenColorMap.slice(1)
3838
}
39-
monaco.editor.defineTheme(name, monacoTheme)
39+
monaco.editor.defineTheme(name, monacoTheme, vscodeTheme.semanticHighlighting)
4040
}
4141

4242
export function getThemeData (themeName: string): monaco.extra.ColorThemeData | null {

src/theme/tools.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export interface IVSCodeTheme {
4141
type: monaco.editor.ColorScheme
4242
colors: { [name: string]: string }
4343
tokenColors: monaco.extra.ITextMateThemingRule[]
44-
semanticTokenColors: Record<string, monaco.extra.ITokenColorizationSetting>
44+
semanticTokenColors?: Record<string, monaco.extra.ITokenColorizationSetting>
45+
semanticHighlighting?: boolean
4546
}
4647

4748
const getBase = (type: monaco.editor.ColorScheme) => {

0 commit comments

Comments
 (0)