Skip to content

Commit c7be648

Browse files
authored
Remove inlayHints from diff view.
Similar to issues we had with semantic tokens in the diff view, documents from schemes other than file likely do not match the language server's view of the workspace.
1 parent 4729846 commit c7be648

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/features/inlayHintProvider.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export default class CSharpInlayHintProvider extends AbstractProvider implements
3030
}
3131

3232
async provideInlayHints(document: vscode.TextDocument, range: vscode.Range, token: vscode.CancellationToken): Promise<vscode.InlayHint[]> {
33+
// Exclude documents from other schemes, such as those in the diff view.
34+
if (document.uri.scheme !== "file") {
35+
return [];
36+
}
37+
3338
if (isVirtualCSharpDocument(document)) {
3439
return [];
3540
}

0 commit comments

Comments
 (0)