diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index ed0f14001c9..6425510acf9 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs @@ -3,7 +3,7 @@ //! `ide` crate. use std::{ - io::{Write as _}, + io::Write as _, process::{self, Stdio}, }; diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index 2ba21c0dd3b..06252b921ea 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -473,12 +473,12 @@ export function viewItemTree(ctx: Ctx): Cmd { function crateGraph(ctx: Ctx, full: boolean): Cmd { return async () => { - const node_modules_path = vscode.Uri.file(path.join(ctx.extensionPath, "node_modules")); + const nodeModulesPath = vscode.Uri.file(path.join(ctx.extensionPath, "node_modules")); const panel = vscode.window.createWebviewPanel("rust-analyzer.crate-graph", "rust-analyzer crate graph", vscode.ViewColumn.Two, { enableScripts: true, retainContextWhenHidden: true, - localResourceRoots: [node_modules_path] + localResourceRoots: [nodeModulesPath] }); const params = { full: full, @@ -487,15 +487,15 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd { const dot = await ctx.client.sendRequest(ra.viewCrateGraph, params); const scripts = [ - { file: vscode.Uri.joinPath(node_modules_path, 'd3', 'dist', 'd3.min.js') }, - { file: vscode.Uri.joinPath(node_modules_path, '@hpcc-js', 'wasm', 'dist', 'index.min.js'), worker: true }, - { file: vscode.Uri.joinPath(node_modules_path, 'd3-graphviz', 'build', 'd3-graphviz.min.js') }, - ] + { file: vscode.Uri.joinPath(nodeModulesPath, 'd3', 'dist', 'd3.min.js') }, + { file: vscode.Uri.joinPath(nodeModulesPath, '@hpcc-js', 'wasm', 'dist', 'index.min.js'), worker: true }, + { file: vscode.Uri.joinPath(nodeModulesPath, 'd3-graphviz', 'build', 'd3-graphviz.min.js') }, + ]; - const scripts_html = scripts.map(({ file, worker }) => { - let uri = panel.webview.asWebviewUri(file); - return `` - }).join("\n") + const scriptsHtml = scripts.map(({ file, worker }) => { + const uri = panel.webview.asWebviewUri(file); + return ``; + }).join("\n"); const html = ` @@ -515,7 +515,7 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
- ${scripts_html} + ${scriptsHtml}