Skip to content

Commit

Permalink
Fixes microsoft/monaco-editor#1726: Use enum value as default for aut…
Browse files Browse the repository at this point in the history
…oIndent
  • Loading branch information
alexdima committed Jan 6, 2020
1 parent 25b5d26 commit 52a7b8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/vs/editor/common/config/editorOptions.ts
Expand Up @@ -656,7 +656,7 @@ export interface IEnvironmentalOptions {
export interface IEditorOption<K1 extends EditorOption, V> {
readonly id: K1;
readonly name: string;
readonly defaultValue: V;
defaultValue: V;
/**
* @internal
*/
Expand Down
10 changes: 5 additions & 5 deletions src/vs/editor/editor.api.ts
Expand Up @@ -3,18 +3,18 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { EditorOptions, WrappingIndent } from 'vs/editor/common/config/editorOptions';
import { EditorOptions, WrappingIndent, EditorAutoIndentStrategy } from 'vs/editor/common/config/editorOptions';
import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase';
import { createMonacoEditorAPI } from 'vs/editor/standalone/browser/standaloneEditor';
import { createMonacoLanguagesAPI } from 'vs/editor/standalone/browser/standaloneLanguages';

const global: any = self;

// Set defaults for standalone editor
(<any>EditorOptions.wrappingIndent).defaultValue = WrappingIndent.None;
(<any>EditorOptions.glyphMargin).defaultValue = false;
(<any>EditorOptions.autoIndent).defaultValue = 'advanced';
(<any>EditorOptions.overviewRulerLanes).defaultValue = 2;
EditorOptions.wrappingIndent.defaultValue = WrappingIndent.None;
EditorOptions.glyphMargin.defaultValue = false;
EditorOptions.autoIndent.defaultValue = EditorAutoIndentStrategy.Advanced;
EditorOptions.overviewRulerLanes.defaultValue = 2;

const api = createMonacoBaseAPI();
api.editor = createMonacoEditorAPI();
Expand Down

0 comments on commit 52a7b8e

Please sign in to comment.