File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ export function syntaxTree(ctx: Ctx): Cmd {
340
340
} ;
341
341
}
342
342
343
- // Opens the virtual file that will show hir
343
+ // Opens the virtual file that will show the HIR of the function containing the cursor position
344
344
//
345
345
// The contents of the file come from the `TextDocumentContentProvider`
346
346
export function viewHir ( ctx : Ctx ) : Cmd {
@@ -384,25 +384,11 @@ export function viewHir(ctx: Ctx): Cmd {
384
384
}
385
385
} ;
386
386
387
- void new AstInspector ( ctx ) ;
388
-
389
387
ctx . pushCleanup ( vscode . workspace . registerTextDocumentContentProvider ( 'rust-analyzer' , tdcp ) ) ;
390
- ctx . pushCleanup ( vscode . languages . setLanguageConfiguration ( "ra_syntax_tree" , {
391
- brackets : [ [ "[" , ")" ] ] ,
392
- } ) ) ;
393
388
394
389
return async ( ) => {
395
- const editor = vscode . window . activeTextEditor ;
396
- const rangeEnabled = ! ! editor && ! editor . selection . isEmpty ;
397
-
398
- const uri = rangeEnabled
399
- ? vscode . Uri . parse ( `${ tdcp . uri . toString ( ) } ?range=true` )
400
- : tdcp . uri ;
401
-
402
- const document = await vscode . workspace . openTextDocument ( uri ) ;
403
-
404
- tdcp . eventEmitter . fire ( uri ) ;
405
-
390
+ const document = await vscode . workspace . openTextDocument ( tdcp . uri ) ;
391
+ tdcp . eventEmitter . fire ( tdcp . uri ) ;
406
392
void await vscode . window . showTextDocument ( document , {
407
393
viewColumn : vscode . ViewColumn . Two ,
408
394
preserveFocus : true
You can’t perform that action at this time.
0 commit comments