Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
guyutongxue committed May 17, 2024
1 parent 2dc70b6 commit 84b72bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Whether use light theme or dark theme. Defaults to user's last time choice or sy

Whether enable Clangd and Language Client. Defaults to `true`.

### `locale` (`string`)

Set the editor's display language. Defaults to English. Available value: `cs` `de` `es` `fr` `it` `ja` `ko` `pl` `pt-br` `qps-ploc` `ru` `tr` `zh-hans` `zh-hant`. (This list could be found in the [source of `monaco-editor-wrapper`](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/wrapper/src/vscode/localeLoader.ts)).

### `run` (`boolean|"showOnly"`)

Whether to automatically run the code when editor is ready. If `"showOnly"` is provided, the runner panel is shown but won't run the code. Defaults to `false`.
Expand Down
9 changes: 5 additions & 4 deletions src/preload.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Use for example
// http://localhost:5173/?locale=zh-hans or
// http://localhost:5173/?locale=fr
// for a localised version
// Add this preload script because `monaco-editor-wrapper/vscode/locale`
// needs to be loaded before **ANY** import of `monaco-editor` stuff.
// Assure that `main.ts` is imported after locale loader initialized.

import { initLocalLoader } from "monaco-editor-wrapper/vscode/locale";
await initLocalLoader();

import("./main.ts");

0 comments on commit 84b72bd

Please sign in to comment.