-
Hello, I am having hard time figuring out how to control the size of the left margin. Is it possible at all? There seems to be settings in the Monaco API documentation that indicate to this direction, but I have not been able to get any of them to work. <Editor
options={{
width: width,
height: height,
fontSize: 18,
glyphMargin: true,
layoutInfo: {
lineDecorationsWidth: 1,
glyphMarginWidth: 1
}
}}
defaultLanguage="javascript"
defaultValue={this.props.initialEditorContent}
onChange={this.codeOnChange.bind(this)}
beforeMount={this.handleEditorWillMount.bind(this)}
onMount={this.handleEditorDidMount.bind(this)}
theme="vs-dark"
/>
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
With <Editor
options={{
width: width,
height: height,
fontSize: 18,
glyphMargin: true,
lineNumbersMinChars: 2,
folding: false,
}}
defaultLanguage="javascript"
defaultValue={this.props.initialEditorContent}
onChange={this.codeOnChange.bind(this)}
beforeMount={this.handleEditorWillMount.bind(this)}
onMount={this.handleEditorDidMount.bind(this)}
theme="vs-dark"
/>
|
Beta Was this translation helpful? Give feedback.
With
folding: false
andlineNumbersMinChars: 2
the margin can be set to very reasonable width. The defaultlineNumbersMinChars
value is5
which does not make much sense in my opinion since thelineNumbersMinChars
adds automatically more space if the number of lines can't fit in the margin.