Skip to content

Commit a159dbf

Browse files
committed
Fixed 'languageId' field in TextDocumentItem
1 parent e46f82a commit a159dbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: handler/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (handler *InoHandler) HandleMessageFromIDE(ctx context.Context, conn *jsonr
237237
log.Println(prefix + "notification is not propagated to clangd")
238238
return nil, nil // do not propagate to clangd
239239
} else {
240-
log.Printf(prefix+"to clang: didOpen(%s@%d as '%s')", res.TextDocument.URI, res.TextDocument.Version, p.TextDocument.LanguageID)
240+
log.Printf(prefix+"to clang: didOpen(%s@%d as '%s')", res.TextDocument.URI, res.TextDocument.Version, res.TextDocument.LanguageID)
241241
params = res
242242
}
243243

@@ -714,6 +714,7 @@ func (handler *InoHandler) ino2cppTextDocumentItem(inoItem lsp.TextDocumentItem)
714714
cppItem.Text = handler.sketchMapper.CppText.Text
715715
cppItem.Version = handler.sketchMapper.CppText.Version
716716
} else {
717+
cppItem.LanguageID = inoItem.LanguageID
717718
cppItem.Text = handler.docs[inoItem.URI.Canonical()].Text
718719
cppItem.Version = handler.docs[inoItem.URI.Canonical()].Version
719720
}

0 commit comments

Comments
 (0)