import * as lc from 'vscode-languageclient';
import { Ctx, Cmd } from '../ctx';
+import * as sourceChange from '../source_change';
import { analyzerStatus } from './analyzer_status';
import { matchingBrace } from './matching_brace';
};
}
+function applySourceChange(ctx: Ctx): Cmd {
+ return async (change: sourceChange.SourceChange) => {
+ sourceChange.applySourceChange(ctx, change);
+ }
+}
+
export {
analyzerStatus,
expandMacro,
run,
runSingle,
showReferences,
+ applySourceChange,
};
// Internal commands which are invoked by the server.
ctx.registerCommand('runSingle', commands.runSingle);
ctx.registerCommand('showReferences', commands.showReferences);
+ ctx.registerCommand('applySourceChange', commands.applySourceChange);
if (ctx.config.enableEnhancedTyping) {
ctx.overrideCommand('type', commands.onEnter);