diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/inlay_hints.ts | 11 |
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'; | |||
4 | import { Ctx } from './ctx'; | 4 | import { Ctx } from './ctx'; |
5 | import { log, sendRequestWithRetry } from './util'; | 5 | import { log, sendRequestWithRetry } from './util'; |
6 | 6 | ||
7 | const noInlayUriSchemes = ['git', 'svn']; | ||
8 | |||
7 | export function activateInlayHints(ctx: Ctx) { | 9 | export 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 | ||