File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as vscode from 'vscode';
2
2
import * as lc from 'vscode-languageclient' ;
3
3
4
4
import { Ctx , Cmd } from '../ctx' ;
5
+ import * as sourceChange from '../source_change' ;
5
6
6
7
import { analyzerStatus } from './analyzer_status' ;
7
8
import { matchingBrace } from './matching_brace' ;
@@ -29,6 +30,12 @@ function showReferences(ctx: Ctx): Cmd {
29
30
} ;
30
31
}
31
32
33
+ function applySourceChange ( ctx : Ctx ) : Cmd {
34
+ return async ( change : sourceChange . SourceChange ) => {
35
+ sourceChange . applySourceChange ( ctx , change ) ;
36
+ }
37
+ }
38
+
32
39
export {
33
40
analyzerStatus ,
34
41
expandMacro ,
@@ -41,4 +48,5 @@ export {
41
48
run ,
42
49
runSingle ,
43
50
showReferences ,
51
+ applySourceChange ,
44
52
} ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export async function activate(context: vscode.ExtensionContext) {
26
26
// Internal commands which are invoked by the server.
27
27
ctx . registerCommand ( 'runSingle' , commands . runSingle ) ;
28
28
ctx . registerCommand ( 'showReferences' , commands . showReferences ) ;
29
+ ctx . registerCommand ( 'applySourceChange' , commands . applySourceChange ) ;
29
30
30
31
if ( ctx . config . enableEnhancedTyping ) {
31
32
ctx . overrideCommand ( 'type' , commands . onEnter ) ;
You can’t perform that action at this time.
0 commit comments