allow to provide a language mode when opening text editors

This commit is contained in:
Benjamin Pasero
2019-05-07 15:05:54 +02:00
parent 8deb756222
commit dac56c1816
37 changed files with 961 additions and 780 deletions

View File

@@ -228,10 +228,10 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
});
}
private _doCreateUntitled(resource?: URI, modeId?: string, initialValue?: string): Promise<URI> {
private _doCreateUntitled(resource?: URI, mode?: string, initialValue?: string): Promise<URI> {
return this._untitledEditorService.loadOrCreate({
resource,
modeId,
mode,
initialValue,
useResourcePath: Boolean(resource && resource.path)
}).then(model => {