Skip to content

Commit

Permalink
feat: demo textmate worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jun 5, 2023
1 parent 0446e5f commit 007fc5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ while (variable < 5000) {
"audioCues.onDebugBreak": "on",
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
"debug.toolBarLocation": "docked"
"debug.toolBarLocation": "docked",
"editor.experimental.asyncTokenization": true
}`)
createConfiguredEditor(document.getElementById('settings-editor')!, {
model: settingsModelReference.object.textEditorModel
Expand Down
2 changes: 2 additions & 0 deletions demo/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import getSnippetServiceOverride from 'vscode/service-override/snippets'
import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker'
import JsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker'
import TypescriptWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker'
import TextMateWorker from 'vscode/workers/textMate.worker?worker'
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
import { createConfiguredEditor } from 'vscode/monaco'
import 'vscode/default-extensions/theme-defaults'
Expand Down Expand Up @@ -60,6 +61,7 @@ interface WorkerConstructor {
export type WorkerLoader = () => WorkerConstructor | Promise<WorkerConstructor>
const workerLoaders: Partial<Record<string, WorkerLoader>> = {
editorWorkerService: () => EditorWorker,
textMateWorker: () => TextMateWorker,
json: () => JsonWorker,
javascript: () => TypescriptWorker,
typescript: () => TypescriptWorker
Expand Down

0 comments on commit 007fc5b

Please sign in to comment.