feat(shiki): add Shiki highlighter initialization for syntax highlighting
This commit is contained in:
parent
541aa43d06
commit
2f2b172fb8
14
src/lib/shiki.ts
Normal file
14
src/lib/shiki.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { createHighlighter, Highlighter } from "shiki";
|
||||||
|
|
||||||
|
let highlighter: Highlighter;
|
||||||
|
|
||||||
|
async function initializeHighlighter() {
|
||||||
|
highlighter = await createHighlighter({
|
||||||
|
themes: ["github-light-default", "github-dark-default"],
|
||||||
|
langs: ["c"],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
initializeHighlighter();
|
||||||
|
|
||||||
|
export { highlighter };
|
Loading…
Reference in New Issue
Block a user