Skip to content

Commit

Permalink
Fix service injection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed Dec 12, 2024
1 parent 1409e5d commit 52183ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/langium/src/lsp/default-lsp-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function createDefaultSharedLSPModule(context: DefaultSharedModuleContext
},
workspace: {
TextDocuments: () => new NormalizedTextDocuments(TextDocument),
NotebookDocuments: () => new NormalizedNotebookDocuments(TextDocument)
NotebookDocuments: (services) => new NormalizedNotebookDocuments(services.workspace.TextDocuments)
}
};
}
4 changes: 2 additions & 2 deletions packages/langium/src/lsp/normalized-text-documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ export class NormalizedNotebookDocuments<T extends { uri: DocumentUri }> impleme
return this.notebookDocuments.get(UriUtils.normalize(uri));
}

getNotebookCell(uri: DocumentUri): NotebookCell | undefined {
const value = this.notebookCellMap.get(uri);
getNotebookCell(uri: string | URI): NotebookCell | undefined {
const value = this.notebookCellMap.get(UriUtils.normalize(uri));
return value && value[0];
}

Expand Down

0 comments on commit 52183ea

Please sign in to comment.