mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 17:23:25 -05:00
set mode explicitly to notebook (#18089)
* set mode explicitly to notebook * move setMode to untitledNotebookInput * wait until input is resolved for setMode * invoke only when textInput is undefined * pass the untitledTextInput in test
This commit is contained in:
@@ -26,6 +26,8 @@ export class UntitledNotebookInput extends NotebookInput {
|
||||
@IExtensionService extensionService: IExtensionService
|
||||
) {
|
||||
super(title, resource, textInput, true, textModelService, instantiationService, notebookService, extensionService);
|
||||
// Set the mode explicitly so that the auto language detection doesn't run and mark the model as being JSON
|
||||
this.textInput.resolve().then(() => this.setMode('notebook'));
|
||||
}
|
||||
|
||||
public override get textInput(): UntitledTextEditorInput {
|
||||
|
||||
Reference in New Issue
Block a user