Skip to content

Commit

Permalink
Adapt code to new monaco API
Browse files Browse the repository at this point in the history
  • Loading branch information
CGNonofr committed Nov 10, 2021
1 parent fa37430 commit 698bd2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/monaco-languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export namespace MonacoModelIdentifier {
export function fromModel(model: monaco.editor.IReadOnlyModel): MonacoModelIdentifier {
return {
uri: model.uri,
languageId: model.getModeId()
languageId: model.getLanguageId()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/monaco-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class MonacoWorkspace implements Workspace {
}

protected setModel(uri: string, model: monaco.editor.IModel): TextDocument {
const document = TextDocument.create(uri, model.getModeId(), model.getVersionId(), model.getValue());
const document = TextDocument.create(uri, model.getLanguageId(), model.getVersionId(), model.getValue());
this.documents.set(uri, document);
return document;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function getModel(): monaco.editor.IModel {
}

function createDocument(model: monaco.editor.IReadOnlyModel) {
return TextDocument.create(MODEL_URI, model.getModeId(), model.getVersionId(), model.getValue());
return TextDocument.create(MODEL_URI, model.getLanguageId(), model.getVersionId(), model.getValue());
}

function resolveSchema(url: string): Promise<string> {
Expand Down

0 comments on commit 698bd2d

Please sign in to comment.