From 556b02e66934e2ef52cc8a717acff978d0436f2a Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Wed, 27 Dec 2023 13:59:10 -0600 Subject: [PATCH] fix submit hotkey --- .../components/CodeEditor/useSquiggleEditorView.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/components/src/components/CodeEditor/useSquiggleEditorView.ts b/packages/components/src/components/CodeEditor/useSquiggleEditorView.ts index f8578fbdcd..74cd10f729 100644 --- a/packages/components/src/components/CodeEditor/useSquiggleEditorView.ts +++ b/packages/components/src/components/CodeEditor/useSquiggleEditorView.ts @@ -112,20 +112,26 @@ export function useSquiggleEditorExtensions( const tooltipsExtension = useTooltipsExtension(); + const highPrioritySquiggleExtensions = [ + submitExtension, // works only if listed before `builtinExtensions` + ]; const squiggleExtensions = [ - squiggleLanguageExtension, showGutterExtension, lineWrappingExtension, - submitExtension, onChangeExtension, widthHeightExtension, viewNodeExtension, formatExtension, errorsExtension, tooltipsExtension, + squiggleLanguageExtension, ]; - return [builtinExtensions, squiggleExtensions]; + return [ + highPrioritySquiggleExtensions, + builtinExtensions, + squiggleExtensions, + ]; } export function useSquiggleEditorView({