Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion client/src/components/level.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { codeAtom, leanMonacoAtom, lockEditorModeAtom, selectionsAtom, typewrite
import { gameIdAtom, levelIdAtom, navigateToLandingPageAtom, worldIdAtom } from '../store/location-atoms'
import { gameInfoAtom, levelInfoAtom } from '../store/query-atoms'
import { helpAtom } from '../store/chat-atoms'
import { inventoryOverviewAtom } from '../store/inventory-atoms'
import { mobileAtom } from '../store/preferences-atoms'

const reconfigureLeanMonacoClient = async (leanMonaco: LeanMonaco, options: LeanMonacoOptions) => {
Expand Down
9 changes: 8 additions & 1 deletion client/src/store/editor-atoms.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { atom } from "jotai";
import { LeanMonaco, LeanMonacoOptions } from 'lean4monaco'
import { gameIdAtom } from "./location-atoms";
import { levelProgressAtom, progressAtom } from "./progress-atoms";
import { difficultyAtom, levelProgressAtom, progressAtom } from "./progress-atoms";
import { Selection } from "./progress-types";
import { levelInfoAtom } from "./query-atoms";
import { inventoryAtom } from "./inventory-atoms";

/** Options for the LeanMonaco instance */
export const leanMonacoOptionsAtom = atom<LeanMonacoOptions>(get => {
Expand All @@ -18,6 +19,12 @@ export const leanMonacoOptionsAtom = atom<LeanMonacoOptions>(get => {
// See docstring of `LeanMonacoOptions`!
// For example:
"editor.wordWrap": true,
},
clientOptions: {
initializationOptions: {
difficulty: get(difficultyAtom),
inventory: get(inventoryAtom),
}
}
}})

Expand Down
Loading