Skip to content

WIP: update monaco #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: replace deprecated shiki API
  • Loading branch information
sxzz authored and oumoussa98 committed Apr 18, 2025
commit 91d02de9e65f4bd4daee2c22b7e5eea45038b01d
4 changes: 2 additions & 2 deletions src/monaco/highlight.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as monaco from 'monaco-editor-core'
import { getHighlighterCore } from 'shiki/core'
import { createHighlighterCore } from 'shiki/core'
import { shikiToMonaco } from '@shikijs/monaco'

import langVue from 'shiki/langs/vue.mjs'
import themeDark from 'shiki/themes/dark-plus.mjs'
import themeLight from 'shiki/themes/light-plus.mjs'

export async function registerHighlighter() {
const highlighter = await getHighlighterCore({
const highlighter = await createHighlighterCore({
themes: [themeDark, themeLight],
langs: [langVue],
loadWasm: import('shiki/wasm'),
Expand Down