File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export function activate(context: vscode.ExtensionContext) {
3434 // }, null, savedContext.subscriptions);
3535
3636 vscode . commands . registerCommand ( "emmy.restartServer" , restartServer ) ;
37+ vscode . commands . registerCommand ( "emmy.showReferences" , showReferences ) ;
3738}
3839
3940// this method is called when your extension is deactivated
@@ -129,6 +130,14 @@ function restartServer() {
129130 }
130131}
131132
133+ function showReferences ( uri : string , pos : vscode . Position ) {
134+ let u = vscode . Uri . parse ( uri ) ;
135+ let p = new vscode . Position ( pos . line , pos . character ) ;
136+ vscode . commands . executeCommand ( "vscode.executeReferenceProvider" , u , p ) . then ( locations => {
137+ vscode . commands . executeCommand ( "editor.action.showReferences" , u , p , locations ) ;
138+ } ) ;
139+ }
140+
132141function stopServer ( ) {
133142 if ( client ) {
134143 client . stop ( ) ;
You can’t perform that action at this time.
0 commit comments