catppuccin / vscode

🦌 Soothing pastel theme for VSCode & Azure Data Studio
https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc-pack
MIT License
1.43k stars 52 forks source link

fix: shim theme name for shiki #336

Closed nekowinston closed 8 months ago

nekowinston commented 8 months ago

Without this fix, Shiki (at least in Astro) would generate wrong class names:

2024-03-10-151804@2x

This could be fixed via

import { mocha } from "@catppuccin/vscode";
import { defineConfig } from "astro/config";

export default defineConfig({
  markdown: {
    shikiConfig: {
      theme: {
        ...mocha,
        name: "catppuccin-mocha",
      },
    },
  },
});

but it makes sense to shim this for the library user.