aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/inlay_hints.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts
index 6871bc111..46e5f7c0d 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';
4import { Ctx } from './ctx'; 4import { Ctx } from './ctx';
5import { log, sendRequestWithRetry } from './util'; 5import { log, sendRequestWithRetry } from './util';
6 6
7const noInlayUriSchemes = ['git', 'svn'];
8
7export function activateInlayHints(ctx: Ctx) { 9export function activateInlayHints(ctx: Ctx) {
8 const hintsUpdater = new HintsUpdater(ctx); 10 const hintsUpdater = new HintsUpdater(ctx);
9 vscode.window.onDidChangeVisibleTextEditors( 11 vscode.window.onDidChangeVisibleTextEditors(
@@ -90,7 +92,14 @@ class HintsUpdater {
90 92
91 private get allEditors(): vscode.TextEditor[] { 93 private get allEditors(): vscode.TextEditor[] {
92 return vscode.window.visibleTextEditors.filter( 94 return vscode.window.visibleTextEditors.filter(
93 editor => editor.document.languageId === 'rust', 95 editor => {
96 if (editor.document.languageId !== 'rust') {
97 return false;
98 }
99 const scheme = editor.document.uri.scheme;
100 const hasBlacklistedScheme = noInlayUriSchemes.some(s => s === scheme);
101 return !hasBlacklistedScheme;
102 },
94 ); 103 );
95 } 104 }
96 105