Skip to content

Commit 6553f6c

Browse files
rcosta358codex
andcommitted
Match unindent width to editor tabs
Co-authored-by: Codex <codex@openai.com>
1 parent 2e6d20a commit 6553f6c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎scripts/playground/editor-setup.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { EditorState } from '@codemirror/state';
22
import { lineNumbers, highlightActiveLineGutter, highlightSpecialChars, drawSelection, dropCursor, rectangularSelection, crosshairCursor, highlightActiveLine, keymap } from '@codemirror/view';
3-
import { indentOnInput, bracketMatching } from '@codemirror/language';
3+
import { indentOnInput, indentUnit, bracketMatching } from '@codemirror/language';
44
import { history, defaultKeymap, historyKeymap, insertTab, indentLess } from '@codemirror/commands';
55
import { searchKeymap } from '@codemirror/search';
66
import { closeBrackets, autocompletion, closeBracketsKeymap, completionKeymap } from '@codemirror/autocomplete';
@@ -15,6 +15,7 @@ export const editorSetup = [
1515
dropCursor(),
1616
EditorState.allowMultipleSelections.of(true),
1717
indentOnInput(),
18+
indentUnit.of(' '),
1819
bracketMatching(),
1920
closeBrackets(),
2021
autocompletion(),

0 commit comments

Comments
 (0)