Reformat VSCode client code

This commit is contained in:
Lukas Wirth 2022-07-17 17:38:56 +02:00 committed by Bruno Ortiz
parent 364308d1dc
commit 76432d39cb
4 changed files with 82 additions and 72 deletions

View file

@ -3,8 +3,8 @@ import * as lc from "vscode-languageclient/node";
import * as ra from "./lsp_ext";
import * as path from "path";
import {Config, prepareVSCodeConfig} from './config';
import {createClient} from './client';
import {Config, prepareVSCodeConfig} from "./config";
import {createClient} from "./client";
import {
executeDiscoverProject,
isRustDocument,
@ -12,10 +12,15 @@ import {
LazyOutputChannel,
log,
RustEditor,
} from './util';
import {ServerStatusParams} from './lsp_ext';
import {Dependency, DependencyFile, RustDependenciesProvider, DependencyId} from './dependencies_provider';
import {execRevealDependency} from './commands';
} from "./util";
import {ServerStatusParams} from "./lsp_ext";
import {
Dependency,
DependencyFile,
RustDependenciesProvider,
DependencyId,
} from "./dependencies_provider";
import {execRevealDependency} from "./commands";
import {PersistentState} from "./persistent_state";
import {bootstrap} from "./bootstrap";
import {ExecOptions} from "child_process";
@ -113,13 +118,14 @@ export class Ctx {
this.state = new PersistentState(extCtx.globalState);
this.config = new Config(extCtx);
this.updateCommands("disable");
this.updateCommands("disable"
);
this.setServerStatus({
health: "stopped",
});
vscode.window.onDidChangeActiveTextEditor(e => {
vscode.window.onDidChangeActiveTextEditor((e) => {
if (e && isRustEditor(e)) {
execRevealDependency(e).catch(reason => {
execRevealDependency(e).catch((reason) => {
void vscode.window.showErrorMessage(`Dependency error: ${reason}`);
});
}