mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Reformat VSCode client code
This commit is contained in:
parent
364308d1dc
commit
76432d39cb
4 changed files with 82 additions and 72 deletions
|
@ -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}`);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue