Skip to content

Commit

Permalink
docs: add example of a shiki custom language grammar (#1521)
Browse files Browse the repository at this point in the history
Co-authored-by: Laurie Griffiths <laurie@steampunk.digital>
Co-authored-by: _Kerman <kermanx@qq.com>
  • Loading branch information
3 people authored Apr 12, 2024
1 parent 8e43c03 commit 48f536f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/custom/highlighters.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,21 @@ Create `./setup/shiki.ts` file with the following content
```ts
/* ./setup/shiki.ts */
import { defineShikiSetup } from '@slidev/types'
import customLanguage from './customLanguage.tmLanguage.json'

export default defineShikiSetup(() => {
return {
themes: {
dark: 'min-dark',
light: 'min-light',
},
langs: [
'cpp',
customLanguage,
],
transformers: [
// ...
]
],
}
})
```
Expand Down

0 comments on commit 48f536f

Please sign in to comment.