settings sync

This commit is contained in:
Felix Roos
2023-12-17 21:16:29 +01:00
parent 592e54a53f
commit 1cdb5964c6
6 changed files with 34 additions and 58 deletions
-16
View File
@@ -7,20 +7,6 @@ import { StrudelMirror } from '@strudel/codemirror';
import { prebake } from '@strudel/repl';
import { useInView } from 'react-hook-inview';
const initialSettings = {
keybindings: 'strudelTheme',
isLineNumbersDisplayed: true,
isActiveLineHighlighted: false,
isAutoCompletionEnabled: false,
isPatternHighlightingEnabled: true,
isFlashEnabled: true,
isTooltipEnabled: false,
isLineWrappingEnabled: false,
theme: 'strudelTheme',
fontFamily: 'monospace',
fontSize: 18,
};
export function MicroRepl({
code,
hideHeader = false,
@@ -56,7 +42,6 @@ export function MicroRepl({
root: containerRef.current,
initialCode: '// LOADING',
pattern: silence,
settings: initialSettings,
drawTime,
onDraw,
editPattern: (pat, id) => {
@@ -76,7 +61,6 @@ export function MicroRepl({
},
});
// init settings
editor.updateSettings(initialSettings);
editor.setCode(code);
editorRef.current = editor;
}, []);