Skip to content

Commit

Permalink
Update handlers.rs to handlers/requests.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
noahmbright committed Sep 28, 2024
1 parent 546339a commit 01aaa53
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/dev/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The underlying engine makes sure that model is computed lazily (on-demand) and c
`crates/rust-analyzer/src/bin/main.rs` contains the main function which spawns LSP.
This is *the* entry point, but it front-loads a lot of complexity, so it's fine to just skim through it.

`crates/rust-analyzer/src/handlers.rs` implements all LSP requests and is a great place to start if you are already familiar with LSP.
`crates/rust-analyzer/src/handlers/requests.rs` implements all LSP requests and is a great place to start if you are already familiar with LSP.

`Analysis` and `AnalysisHost` types define the main API for consumers of IDE services.

Expand Down
2 changes: 2 additions & 0 deletions editors/code/src/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ async function getDebugConfiguration(
if (debugConfig.name === "run binary") {
// The LSP side: crates\rust-analyzer\src\main_loop\handlers.rs,
// fn to_lsp_runnable(...) with RunnableKind::Bin
// FIXME: Neither crates\rust-analyzer\src\main_loop\handlers.rs
// nor to_lsp_runnable exist anymore
debugConfig.name = `run ${path.basename(executable)}`;
}

Expand Down
2 changes: 1 addition & 1 deletion editors/code/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function selectRunnable(

if (runnables.length === 0) {
// it is the debug case, run always has at least 'cargo check ...'
// see crates\rust-analyzer\src\main_loop\handlers.rs, handle_runnables
// see crates\rust-analyzer\src\handlers\request.rs, handle_runnables
await vscode.window.showErrorMessage("There's no debug target!");
quickPick.dispose();
return;
Expand Down
2 changes: 1 addition & 1 deletion editors/code/src/toolchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Cargo {
static artifactSpec(cargoArgs: string[], executableArgs?: string[]): ArtifactSpec {
cargoArgs = [...cargoArgs, "--message-format=json"];
// arguments for a runnable from the quick pick should be updated.
// see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
// see crates\rust-analyzer\src\handlers\request.rs, handle_code_lens
switch (cargoArgs[0]) {
case "run":
cargoArgs[0] = "build";
Expand Down

0 comments on commit 01aaa53

Please sign in to comment.