From 84c0b5397cb5c2a5cf3934bb4c0254965c56ab8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Tue, 11 Jun 2024 15:00:21 +0200 Subject: [PATCH] feat: add CSS variables for markup diff tokens (#698) --- packages/shiki/src/theme-css-variables.ts | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/packages/shiki/src/theme-css-variables.ts b/packages/shiki/src/theme-css-variables.ts index 5815674a0..246faae0b 100644 --- a/packages/shiki/src/theme-css-variables.ts +++ b/packages/shiki/src/theme-css-variables.ts @@ -231,6 +231,36 @@ export function createCssVariablesTheme(options: CssVariablesThemeOptions = {}): foreground: variable('token-keyword'), }, }, + { + // [Custom] Diff + scope: [ + 'markup.inserted', + 'meta.diff.header.to-file', + 'punctuation.definition.inserted', + ], + settings: { + foreground: variable('token-inserted'), + }, + }, + { + scope: [ + 'markup.deleted', + 'meta.diff.header.from-file', + 'punctuation.definition.deleted', + ], + settings: { + foreground: variable('token-deleted'), + }, + }, + { + scope: [ + 'markup.changed', + 'punctuation.definition.changed', + ], + settings: { + foreground: variable('token-changed'), + }, + }, ], }