@@ -336,7 +336,7 @@ export function toggleInlayHints(_ctx: Ctx): Cmd {
336336// The contents of the file come from the `TextDocumentContentProvider`
337337export function syntaxTree ( ctx : Ctx ) : Cmd {
338338 const tdcp = new ( class implements vscode . TextDocumentContentProvider {
339- readonly uri = vscode . Uri . parse ( "rust-analyzer://syntaxtree/tree.rast" ) ;
339+ readonly uri = vscode . Uri . parse ( "rust-analyzer-syntax-tree ://syntaxtree/tree.rast" ) ;
340340 readonly eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
341341 constructor ( ) {
342342 vscode . workspace . onDidChangeTextDocument (
@@ -388,7 +388,9 @@ export function syntaxTree(ctx: Ctx): Cmd {
388388
389389 void new AstInspector ( ctx ) ;
390390
391- ctx . pushCleanup ( vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer" , tdcp ) ) ;
391+ ctx . pushCleanup (
392+ vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer-syntax-tree" , tdcp )
393+ ) ;
392394 ctx . pushCleanup (
393395 vscode . languages . setLanguageConfiguration ( "ra_syntax_tree" , {
394396 brackets : [ [ "[" , ")" ] ] ,
@@ -417,7 +419,7 @@ export function syntaxTree(ctx: Ctx): Cmd {
417419// The contents of the file come from the `TextDocumentContentProvider`
418420export function viewHir ( ctx : Ctx ) : Cmd {
419421 const tdcp = new ( class implements vscode . TextDocumentContentProvider {
420- readonly uri = vscode . Uri . parse ( "rust-analyzer://viewHir/hir.txt" ) ;
422+ readonly uri = vscode . Uri . parse ( "rust-analyzer-hir ://viewHir/hir.txt" ) ;
421423 readonly eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
422424 constructor ( ) {
423425 vscode . workspace . onDidChangeTextDocument (
@@ -467,7 +469,9 @@ export function viewHir(ctx: Ctx): Cmd {
467469 }
468470 } ) ( ) ;
469471
470- ctx . pushCleanup ( vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer" , tdcp ) ) ;
472+ ctx . pushCleanup (
473+ vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer-hir" , tdcp )
474+ ) ;
471475
472476 return async ( ) => {
473477 const document = await vscode . workspace . openTextDocument ( tdcp . uri ) ;
@@ -481,7 +485,7 @@ export function viewHir(ctx: Ctx): Cmd {
481485
482486export function viewFileText ( ctx : Ctx ) : Cmd {
483487 const tdcp = new ( class implements vscode . TextDocumentContentProvider {
484- readonly uri = vscode . Uri . parse ( "rust-analyzer://viewFileText/file.rs" ) ;
488+ readonly uri = vscode . Uri . parse ( "rust-analyzer-file-text ://viewFileText/file.rs" ) ;
485489 readonly eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
486490 constructor ( ) {
487491 vscode . workspace . onDidChangeTextDocument (
@@ -528,7 +532,9 @@ export function viewFileText(ctx: Ctx): Cmd {
528532 }
529533 } ) ( ) ;
530534
531- ctx . pushCleanup ( vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer" , tdcp ) ) ;
535+ ctx . pushCleanup (
536+ vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer-file-text" , tdcp )
537+ ) ;
532538
533539 return async ( ) => {
534540 const document = await vscode . workspace . openTextDocument ( tdcp . uri ) ;
@@ -542,7 +548,7 @@ export function viewFileText(ctx: Ctx): Cmd {
542548
543549export function viewItemTree ( ctx : Ctx ) : Cmd {
544550 const tdcp = new ( class implements vscode . TextDocumentContentProvider {
545- readonly uri = vscode . Uri . parse ( "rust-analyzer://viewItemTree/itemtree.rs" ) ;
551+ readonly uri = vscode . Uri . parse ( "rust-analyzer-item-tree ://viewItemTree/itemtree.rs" ) ;
546552 readonly eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
547553 constructor ( ) {
548554 vscode . workspace . onDidChangeTextDocument (
@@ -591,7 +597,9 @@ export function viewItemTree(ctx: Ctx): Cmd {
591597 }
592598 } ) ( ) ;
593599
594- ctx . pushCleanup ( vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer" , tdcp ) ) ;
600+ ctx . pushCleanup (
601+ vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer-item-tree" , tdcp )
602+ ) ;
595603
596604 return async ( ) => {
597605 const document = await vscode . workspace . openTextDocument ( tdcp . uri ) ;
@@ -688,7 +696,7 @@ export function expandMacro(ctx: Ctx): Cmd {
688696 }
689697
690698 const tdcp = new ( class implements vscode . TextDocumentContentProvider {
691- uri = vscode . Uri . parse ( "rust-analyzer://expandMacro/[EXPANSION].rs" ) ;
699+ uri = vscode . Uri . parse ( "rust-analyzer-expand-macro ://expandMacro/[EXPANSION].rs" ) ;
692700 eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
693701 async provideTextDocumentContent ( _uri : vscode . Uri ) : Promise < string > {
694702 const editor = vscode . window . activeTextEditor ;
@@ -714,7 +722,9 @@ export function expandMacro(ctx: Ctx): Cmd {
714722 }
715723 } ) ( ) ;
716724
717- ctx . pushCleanup ( vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer" , tdcp ) ) ;
725+ ctx . pushCleanup (
726+ vscode . workspace . registerTextDocumentContentProvider ( "rust-analyzer-expand-macro" , tdcp )
727+ ) ;
718728
719729 return async ( ) => {
720730 const document = await vscode . workspace . openTextDocument ( tdcp . uri ) ;
0 commit comments