diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts index 6871bc1118..46e5f7c0d3 100644 --- a/editors/code/src/inlay_hints.ts +++ b/editors/code/src/inlay_hints.ts @@ -4,6 +4,8 @@ import * as ra from './rust-analyzer-api'; import { Ctx } from './ctx'; import { log, sendRequestWithRetry } from './util'; +const noInlayUriSchemes = ['git', 'svn']; + export function activateInlayHints(ctx: Ctx) { const hintsUpdater = new HintsUpdater(ctx); vscode.window.onDidChangeVisibleTextEditors( @@ -90,7 +92,14 @@ class HintsUpdater { private get allEditors(): vscode.TextEditor[] { return vscode.window.visibleTextEditors.filter( - editor => editor.document.languageId === 'rust', + editor => { + if (editor.document.languageId !== 'rust') { + return false; + } + const scheme = editor.document.uri.scheme; + const hasBlacklistedScheme = noInlayUriSchemes.some(s => s === scheme); + return !hasBlacklistedScheme; + }, ); }