Add config to Ctx

This commit is contained in:
Aleksey Kladov 2019-12-30 20:46:14 +01:00
parent 7646dc046e
commit efbbc903e6
4 changed files with 10 additions and 9 deletions

View file

@ -28,13 +28,11 @@ export async function activate(context: vscode.ExtensionContext) {
ctx.registerCommand('runSingle', commands.runSingle);
ctx.registerCommand('showReferences', commands.showReferences);
if (Server.config.enableEnhancedTyping) {
if (ctx.config.enableEnhancedTyping) {
ctx.overrideCommand('type', commands.onEnter);
}
const watchStatus = new StatusDisplay(
Server.config.cargoWatchOptions.command,
);
const watchStatus = new StatusDisplay(ctx.config.cargoWatchOptions.command);
ctx.pushCleanup(watchStatus);
activateHighlighting(ctx);
@ -63,7 +61,7 @@ export async function activate(context: vscode.ExtensionContext) {
vscode.window.showErrorMessage(e.message);
}
if (Server.config.displayInlayHints) {
if (ctx.config.displayInlayHints) {
activateInlayHints(ctx);
}
}