Force advanced editor to 2 spaces indentation
This commit is contained in:
1 parent
1e8e9d5efe
commit
87f8090bb9
1 file changed
+6
@@ -52,6 +52,9 @@ export default function AdvancedConfigEditor<T>({ config, setConfig, transformOn
|
||||
monacoRef.current = monaco;
|
||||
isEditorMounted.current = true;
|
||||
|
||||
// Model auto-detects indentation on creation; force 2 spaces
|
||||
editor.getModel()?.updateOptions({ tabSize: 2, insertSpaces: true });
|
||||
|
||||
// Initial content setup
|
||||
try {
|
||||
const yamlContent = toYaml(config);
|
||||
@@ -161,6 +164,9 @@ export default function AdvancedConfigEditor<T>({ config, setConfig, transformOn
|
||||
minimap: { enabled: true },
|
||||
scrollBeyondLastLine: false,
|
||||
automaticLayout: true,
|
||||
tabSize: 2,
|
||||
insertSpaces: true,
|
||||
detectIndentation: false,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user