From 295261a98f1311d66cb0a6576795d73b8226f58d Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Fri, 24 May 2024 17:37:33 +0200 Subject: [PATCH] disable accepting suggestions on enter --- client/src/Editor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/Editor.tsx b/client/src/Editor.tsx index 7eea82c6..ed58933c 100644 --- a/client/src/Editor.tsx +++ b/client/src/Editor.tsx @@ -65,6 +65,8 @@ const Editor: React.FC<{setRestart?, onDidChangeContent?, value: string, theme: if (onDidChangeContent) { model.onDidChangeContent(() => onDidChangeContent(model.getValue())) } + // see available options here: + // https://microsoft.github.io/monaco-editor/typedoc/variables/editor.EditorOptions.html const editor = monaco.editor.create(codeviewRef.current!, { model, glyphMargin: true, @@ -88,7 +90,8 @@ const Editor: React.FC<{setRestart?, onDidChangeContent?, value: string, theme: theme: 'vs', wordWrap: config.wordWrap ? "on" : "off", fontFamily: "JuliaMono", - wrappingStrategy: "advanced" + wrappingStrategy: "advanced", + acceptSuggestionOnEnter: "off" }) setEditor(editor) const abbrevRewriter = new AbbreviationRewriter(new AbbreviationProvider(), model, editor)