Open Baccata opened 1 year ago
You should be able to add the custom grammar in the options at the same place you define which themes to use. Note that you have to extend the existing languages by importing them from the 'shiki'
package. As an example, this is how I've handled it:
import { BUNDLED_LANGUAGES } from 'shiki';
// see docs for where to put options:
{
themes: ['github-light', 'github-dark'],
langs: [
...BUNDLED_LANGUAGES,
{
id: 'wit',
scopeName: 'source.wit',
path: path.resolve('./languages/wit.tmLanguage.json'),
aliases: ['wit'],
},
],
}
Hello everyone.
I'm looking for a way to configure the docusaurus plugin with a custom textmate grammar to get highlighting for languages that aren't supported out-of-the-box by Shiki.
Could anyone offer some guidance as to what would be the most straightforward way to achieve this ?