mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
allow option.tabSize to use custom number of spaces for [Tab]
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
8b854b50a4
commit
969be592de
@ -143,6 +143,7 @@ export class MonacoEditor extends React.Component<MonacoEditorProps> {
|
|||||||
|
|
||||||
this.editor = editor.create(this.containerElem, {
|
this.editor = editor.create(this.containerElem, {
|
||||||
model: this.model,
|
model: this.model,
|
||||||
|
detectIndentation: false, // allow `option.tabSize` to use custom number of spaces for [Tab]
|
||||||
value: defaultValue,
|
value: defaultValue,
|
||||||
language,
|
language,
|
||||||
theme,
|
theme,
|
||||||
@ -178,7 +179,11 @@ export class MonacoEditor extends React.Component<MonacoEditorProps> {
|
|||||||
reaction(() => this.model, this.onModelChange),
|
reaction(() => this.model, this.onModelChange),
|
||||||
reaction(() => this.props.theme, editor.setTheme),
|
reaction(() => this.props.theme, editor.setTheme),
|
||||||
reaction(() => this.props.value, value => this.setValue(value)),
|
reaction(() => this.props.value, value => this.setValue(value)),
|
||||||
reaction(() => this.options, opts => this.editor.updateOptions(opts)),
|
reaction(() => this.options, opts => {
|
||||||
|
|
||||||
|
console.log('OPTS', opts)
|
||||||
|
this.editor.updateOptions(opts);
|
||||||
|
}),
|
||||||
|
|
||||||
() => onDidLayoutChangeDisposer.dispose(),
|
() => onDidLayoutChangeDisposer.dispose(),
|
||||||
() => onValueChangeDisposer.dispose(),
|
() => onValueChangeDisposer.dispose(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user