#Switch to Shikiji broke custom language

1 messages · Page 1 of 1 (latest)

icy grove
#

Hi people,

With the new shikiji syntax highlighter, using a path to a custom tmLanguage.json file in the astro.config.mjs no longer works.

For example, this would work with shiki:

markdown: {
    shikiConfig: {
      theme: "github-dark-dimmed",
      langs: [
        {
          id: "caddy",
          scopeName: "source.Caddyfile",
          path: "../../src/caddyfile.tmLanguage.json",
        },
      ],
    },
  }

But it seems shikiji does not support path and requires you to use built-in languges only, packaged as ES modules.

Is this true? Do I need to revert to an earlier Astro version to get this working again, or is there another way?

Here is the PR regarding the switch from shiki to shikiji:
https://github.com/withastro/astro/pull/8502

stoic tusk
sacred crescent
#

The switch to shikiji should also cover the breaking changes, at least until Astro cuts a new major. Would you be able to open a GitHub issue @icy grove ? I can try to take a look and fix it.