Skip to content

Commit 80207f4

Browse files
authored
feat: Change autoclosing bracket behavior to beforeWhitespace (#1905)
Checked enterprise and we don't call `editor.create` anywhere there. We should really centralize these in `MonacoUtils` with a `createEditor` or something, but not doing that here.
1 parent a737f68 commit 80207f4

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

packages/console/src/ConsoleInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export class ConsoleInput extends PureComponent<
183183
},
184184
value: '',
185185
wordWrap: 'on',
186+
autoClosingBrackets: 'beforeWhitespace',
186187
} as const;
187188

188189
const element = this.commandContainer.current;

packages/console/src/notebook/Editor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class Editor extends Component<EditorProps, Record<string, never>> {
9191
value: '',
9292
wordWrap: 'off',
9393
links: true,
94+
autoClosingBrackets: 'beforeWhitespace',
9495
...settings,
9596
};
9697
assertNotNull(this.container);

packages/iris-grid/src/sidebar/InputEditor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export class InputEditor extends Component<InputEditorProps, InputEditorState> {
8888
value,
8989
wordWrap: 'on',
9090
automaticLayout: true,
91+
autoClosingBrackets: 'beforeWhitespace',
9192
...editorSettings,
9293
} as monaco.editor.IStandaloneEditorConstructionOptions;
9394
if (!this.editorContainer) {

0 commit comments

Comments
 (0)