Skip to content

Commit

Permalink
fix(language-server): provide languageId to opened documents
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed May 31, 2024
1 parent e2791c8 commit 6865625
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/language-server/lib/hybridModeProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ export function createHybridModeProject(
serviceEnv: LanguageServiceEnvironment,
languagePlugins: LanguagePlugin<URI>[],
) {
const language = createLanguage(languagePlugins, createUriMap(), uri => {
const language = createLanguage([
{ getLanguageId: uri => server.documents.get(server.getSyncedDocumentKey(uri) ?? uri.toString())?.languageId },
...languagePlugins,
], createUriMap(), uri => {
const documentKey = server.getSyncedDocumentKey(uri);
const document = documentKey ? server.documents.get(documentKey) : undefined;
if (document) {
Expand Down

0 comments on commit 6865625

Please sign in to comment.