aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yaml22
-rw-r--r--.vscode/launch.json4
-rw-r--r--.vscode/tasks.json2
-rw-r--r--Cargo.lock76
-rw-r--r--README.md2
-rw-r--r--crates/ra_db/src/input.rs2
-rw-r--r--crates/ra_ide_db/src/feature_flags.rs2
-rw-r--r--crates/ra_prof/src/lib.rs4
-rw-r--r--crates/ra_syntax/Cargo.toml2
-rw-r--r--crates/ra_tt/Cargo.toml2
-rw-r--r--crates/rust-analyzer/Cargo.toml (renamed from crates/ra_lsp_server/Cargo.toml)4
-rw-r--r--crates/rust-analyzer/build.rs (renamed from crates/ra_lsp_server/build.rs)0
-rw-r--r--crates/rust-analyzer/src/bin/args.rs (renamed from crates/ra_lsp_server/src/bin/args.rs)16
-rw-r--r--crates/rust-analyzer/src/bin/main.rs (renamed from crates/ra_lsp_server/src/bin/main.rs)6
-rw-r--r--crates/rust-analyzer/src/caps.rs (renamed from crates/ra_lsp_server/src/caps.rs)0
-rw-r--r--crates/rust-analyzer/src/cargo_target_spec.rs (renamed from crates/ra_lsp_server/src/cargo_target_spec.rs)0
-rw-r--r--crates/rust-analyzer/src/cli.rs (renamed from crates/ra_lsp_server/src/cli.rs)0
-rw-r--r--crates/rust-analyzer/src/cli/analysis_bench.rs (renamed from crates/ra_lsp_server/src/cli/analysis_bench.rs)0
-rw-r--r--crates/rust-analyzer/src/cli/analysis_stats.rs (renamed from crates/ra_lsp_server/src/cli/analysis_stats.rs)0
-rw-r--r--crates/rust-analyzer/src/cli/load_cargo.rs (renamed from crates/ra_lsp_server/src/cli/load_cargo.rs)0
-rw-r--r--crates/rust-analyzer/src/cli/progress_report.rs (renamed from crates/ra_lsp_server/src/cli/progress_report.rs)0
-rw-r--r--crates/rust-analyzer/src/config.rs (renamed from crates/ra_lsp_server/src/config.rs)0
-rw-r--r--crates/rust-analyzer/src/conv.rs (renamed from crates/ra_lsp_server/src/conv.rs)0
-rw-r--r--crates/rust-analyzer/src/diagnostics.rs (renamed from crates/ra_lsp_server/src/diagnostics.rs)0
-rw-r--r--crates/rust-analyzer/src/lib.rs (renamed from crates/ra_lsp_server/src/lib.rs)0
-rw-r--r--crates/rust-analyzer/src/main_loop.rs (renamed from crates/ra_lsp_server/src/main_loop.rs)2
-rw-r--r--crates/rust-analyzer/src/main_loop/handlers.rs (renamed from crates/ra_lsp_server/src/main_loop/handlers.rs)0
-rw-r--r--crates/rust-analyzer/src/main_loop/pending_requests.rs (renamed from crates/ra_lsp_server/src/main_loop/pending_requests.rs)0
-rw-r--r--crates/rust-analyzer/src/main_loop/subscriptions.rs (renamed from crates/ra_lsp_server/src/main_loop/subscriptions.rs)0
-rw-r--r--crates/rust-analyzer/src/markdown.rs (renamed from crates/ra_lsp_server/src/markdown.rs)0
-rw-r--r--crates/rust-analyzer/src/req.rs (renamed from crates/ra_lsp_server/src/req.rs)0
-rw-r--r--crates/rust-analyzer/src/vfs_glob.rs (renamed from crates/ra_lsp_server/src/vfs_glob.rs)0
-rw-r--r--crates/rust-analyzer/src/world.rs (renamed from crates/ra_lsp_server/src/world.rs)0
-rw-r--r--crates/rust-analyzer/tests/heavy_tests/main.rs (renamed from crates/ra_lsp_server/tests/heavy_tests/main.rs)2
-rw-r--r--crates/rust-analyzer/tests/heavy_tests/support.rs (renamed from crates/ra_lsp_server/tests/heavy_tests/support.rs)2
-rw-r--r--docs/dev/README.md18
-rw-r--r--docs/dev/architecture.md6
-rw-r--r--docs/dev/debugging.md16
-rw-r--r--docs/user/readme.adoc10
-rw-r--r--editors/code/package.json6
-rw-r--r--editors/code/src/config.ts10
-rw-r--r--editors/code/src/installation/server.ts2
-rw-r--r--xtask/src/install.rs4
43 files changed, 111 insertions, 111 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index d6d5dba95..a697c0071 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -44,29 +44,29 @@ jobs:
44 CC: clang 44 CC: clang
45 with: 45 with:
46 command: build 46 command: build
47 args: --package ra_lsp_server --bin ra_lsp_server --release --target x86_64-unknown-linux-musl 47 args: --package rust-analyzer --bin rust-analyzer --release --target x86_64-unknown-linux-musl
48 48
49 - name: Build 49 - name: Build
50 if: matrix.os != 'ubuntu-latest' 50 if: matrix.os != 'ubuntu-latest'
51 uses: actions-rs/cargo@v1 51 uses: actions-rs/cargo@v1
52 with: 52 with:
53 command: build 53 command: build
54 args: --package ra_lsp_server --bin ra_lsp_server --release 54 args: --package rust-analyzer --bin rust-analyzer --release
55 55
56 - name: Create distribution dir 56 - name: Create distribution dir
57 run: mkdir ./dist 57 run: mkdir ./dist
58 58
59 - name: Copy binary 59 - name: Copy binary
60 if: matrix.os == 'ubuntu-latest' 60 if: matrix.os == 'ubuntu-latest'
61 run: cp ./target/x86_64-unknown-linux-musl/release/ra_lsp_server ./dist/ra_lsp_server-linux && strip ./dist/ra_lsp_server-linux 61 run: cp ./target/x86_64-unknown-linux-musl/release/rust-analyzer ./dist/rust-analyzer-linux && strip ./dist/rust-analyzer-linux
62 62
63 - name: Copy binary 63 - name: Copy binary
64 if: matrix.os == 'macos-latest' 64 if: matrix.os == 'macos-latest'
65 run: cp ./target/release/ra_lsp_server ./dist/ra_lsp_server-mac 65 run: cp ./target/release/rust-analyzer ./dist/rust-analyzer-mac
66 66
67 - name: Copy binary 67 - name: Copy binary
68 if: matrix.os == 'windows-latest' 68 if: matrix.os == 'windows-latest'
69 run: copy ./target/release/ra_lsp_server.exe ./dist/ra_lsp_server-windows.exe 69 run: copy ./target/release/rust-analyzer.exe ./dist/rust-analyzer-windows.exe
70 70
71 - name: Upload artifacts 71 - name: Upload artifacts
72 uses: actions/upload-artifact@v1 72 uses: actions/upload-artifact@v1
@@ -153,8 +153,8 @@ jobs:
153 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 153 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154 with: 154 with:
155 upload_url: ${{ steps.create_release.outputs.upload_url }} 155 upload_url: ${{ steps.create_release.outputs.upload_url }}
156 asset_path: ./dist/ra_lsp_server-linux 156 asset_path: ./dist/rust-analyzer-linux
157 asset_name: ra_lsp_server-linux 157 asset_name: rust-analyzer-linux
158 asset_content_type: application/octet-stream 158 asset_content_type: application/octet-stream
159 159
160 - uses: actions/[email protected] 160 - uses: actions/[email protected]
@@ -162,8 +162,8 @@ jobs:
162 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 162 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163 with: 163 with:
164 upload_url: ${{ steps.create_release.outputs.upload_url }} 164 upload_url: ${{ steps.create_release.outputs.upload_url }}
165 asset_path: ./dist/ra_lsp_server-mac 165 asset_path: ./dist/rust-analyzer-mac
166 asset_name: ra_lsp_server-mac 166 asset_name: rust-analyzer-mac
167 asset_content_type: application/octet-stream 167 asset_content_type: application/octet-stream
168 168
169 - uses: actions/[email protected] 169 - uses: actions/[email protected]
@@ -171,8 +171,8 @@ jobs:
171 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 171 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172 with: 172 with:
173 upload_url: ${{ steps.create_release.outputs.upload_url }} 173 upload_url: ${{ steps.create_release.outputs.upload_url }}
174 asset_path: ./dist/ra_lsp_server-windows.exe 174 asset_path: ./dist/rust-analyzer-windows.exe
175 asset_name: ra_lsp_server-windows.exe 175 asset_name: rust-analyzer-windows.exe
176 asset_content_type: application/octet-stream 176 asset_content_type: application/octet-stream
177 177
178 - uses: actions/[email protected] 178 - uses: actions/[email protected]
diff --git a/.vscode/launch.json b/.vscode/launch.json
index b1bd98d4a..2e5c61735 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -45,7 +45,7 @@
45 "<node_internals>/**/*.js" 45 "<node_internals>/**/*.js"
46 ], 46 ],
47 "env": { 47 "env": {
48 "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/ra_lsp_server" 48 "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/rust-analyzer"
49 } 49 }
50 }, 50 },
51 { 51 {
@@ -59,7 +59,7 @@
59 "name": "Attach To Server", 59 "name": "Attach To Server",
60 "type": "lldb", 60 "type": "lldb",
61 "request": "attach", 61 "request": "attach",
62 "program": "${workspaceFolder}/target/debug/ra_lsp_server", 62 "program": "${workspaceFolder}/target/debug/rust-analyzer",
63 "pid": "${command:pickMyProcess}", 63 "pid": "${command:pickMyProcess}",
64 "sourceLanguages": [ 64 "sourceLanguages": [
65 "rust" 65 "rust"
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index fc9a8593b..4037e7cce 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -19,7 +19,7 @@
19 "label": "Build Server", 19 "label": "Build Server",
20 "group": "build", 20 "group": "build",
21 "type": "shell", 21 "type": "shell",
22 "command": "cargo build --package ra_lsp_server", 22 "command": "cargo build --package rust-analyzer",
23 "problemMatcher": "$rustc" 23 "problemMatcher": "$rustc"
24 }, 24 },
25 ] 25 ]
diff --git a/Cargo.lock b/Cargo.lock
index c22cbca3a..c10d72aa4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1095,44 +1095,6 @@ dependencies = [
1095] 1095]
1096 1096
1097[[package]] 1097[[package]]
1098name = "ra_lsp_server"
1099version = "0.1.0"
1100dependencies = [
1101 "anyhow",
1102 "crossbeam-channel",
1103 "either",
1104 "env_logger",
1105 "globset",
1106 "itertools",
1107 "jod-thread",
1108 "log",
1109 "lsp-server",
1110 "lsp-types",
1111 "parking_lot",
1112 "pico-args",
1113 "ra_cargo_watch",
1114 "ra_db",
1115 "ra_hir",
1116 "ra_hir_def",
1117 "ra_hir_ty",
1118 "ra_ide",
1119 "ra_prof",
1120 "ra_project_model",
1121 "ra_syntax",
1122 "ra_text_edit",
1123 "ra_vfs",
1124 "rand",
1125 "relative-path",
1126 "rustc-hash",
1127 "serde",
1128 "serde_json",
1129 "tempfile",
1130 "test_utils",
1131 "threadpool",
1132 "winapi 0.3.8",
1133]
1134
1135[[package]]
1136name = "ra_mbe" 1098name = "ra_mbe"
1137version = "0.1.0" 1099version = "0.1.0"
1138dependencies = [ 1100dependencies = [
@@ -1354,6 +1316,44 @@ dependencies = [
1354] 1316]
1355 1317
1356[[package]] 1318[[package]]
1319name = "rust-analyzer"
1320version = "0.1.0"
1321dependencies = [
1322 "anyhow",
1323 "crossbeam-channel",
1324 "either",
1325 "env_logger",
1326 "globset",
1327 "itertools",
1328 "jod-thread",
1329 "log",
1330 "lsp-server",
1331 "lsp-types",
1332 "parking_lot",
1333 "pico-args",
1334 "ra_cargo_watch",
1335 "ra_db",
1336 "ra_hir",
1337 "ra_hir_def",
1338 "ra_hir_ty",
1339 "ra_ide",
1340 "ra_prof",
1341 "ra_project_model",
1342 "ra_syntax",
1343 "ra_text_edit",
1344 "ra_vfs",
1345 "rand",
1346 "relative-path",
1347 "rustc-hash",
1348 "serde",
1349 "serde_json",
1350 "tempfile",
1351 "test_utils",
1352 "threadpool",
1353 "winapi 0.3.8",
1354]
1355
1356[[package]]
1357name = "rustc-demangle" 1357name = "rustc-demangle"
1358version = "0.1.16" 1358version = "0.1.16"
1359source = "registry+https://github.com/rust-lang/crates.io-index" 1359source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/README.md b/README.md
index fabb8479d..13d81d4ae 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ $ git clone https://github.com/rust-analyzer/rust-analyzer && cd rust-analyzer
35# install both the language server and VS Code extension 35# install both the language server and VS Code extension
36$ cargo xtask install 36$ cargo xtask install
37 37
38# alternatively, install only the server. Binary name is `ra_lsp_server`. 38# alternatively, install only the server. Binary name is `rust-analyzer`.
39$ cargo xtask install --server 39$ cargo xtask install --server
40``` 40```
41 41
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index 1f1dcea42..1b4b47215 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -3,7 +3,7 @@
3//! derived from this input. 3//! derived from this input.
4//! 4//!
5//! Note that neither this module, nor any other part of the analyzer's core do 5//! Note that neither this module, nor any other part of the analyzer's core do
6//! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how 6//! actual IO. See `vfs` and `project_model` in the `rust-analyzer` crate for how
7//! actual IO is done and lowered to input. 7//! actual IO is done and lowered to input.
8 8
9use std::{fmt, str::FromStr}; 9use std::{fmt, str::FromStr};
diff --git a/crates/ra_ide_db/src/feature_flags.rs b/crates/ra_ide_db/src/feature_flags.rs
index 1b3cabf4d..76655f572 100644
--- a/crates/ra_ide_db/src/feature_flags.rs
+++ b/crates/ra_ide_db/src/feature_flags.rs
@@ -13,7 +13,7 @@ use rustc_hash::FxHashMap;
13/// checked at compile time, to keep things simple and flexible. 13/// checked at compile time, to keep things simple and flexible.
14/// 14///
15/// Also note that, at the moment, `FeatureFlags` also store features for 15/// Also note that, at the moment, `FeatureFlags` also store features for
16/// `ra_lsp_server`. This should be benign layering violation. 16/// `rust-analyzer`. This should be benign layering violation.
17#[derive(Debug)] 17#[derive(Debug)]
18pub struct FeatureFlags { 18pub struct FeatureFlags {
19 flags: FxHashMap<String, bool>, 19 flags: FxHashMap<String, bool>,
diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs
index 7ff8db58a..c267bc85f 100644
--- a/crates/ra_prof/src/lib.rs
+++ b/crates/ra_prof/src/lib.rs
@@ -351,13 +351,13 @@ impl Drop for Scope {
351/// 2. Build with `cpu_profiler` feature. 351/// 2. Build with `cpu_profiler` feature.
352/// 3. Tun the code, the *raw* output would be in the `./out.profile` file. 352/// 3. Tun the code, the *raw* output would be in the `./out.profile` file.
353/// 4. Install pprof for visualization (https://github.com/google/pprof). 353/// 4. Install pprof for visualization (https://github.com/google/pprof).
354/// 5. Use something like `pprof -svg target/release/ra_lsp_server ./out.profile` to see the results. 354/// 5. Use something like `pprof -svg target/release/rust-analyzer ./out.profile` to see the results.
355/// 355///
356/// For example, here's how I run profiling on NixOS: 356/// For example, here's how I run profiling on NixOS:
357/// 357///
358/// ```bash 358/// ```bash
359/// $ nix-shell -p gperftools --run \ 359/// $ nix-shell -p gperftools --run \
360/// 'cargo run --release -p ra_lsp_server -- parse < ~/projects/rustbench/parser.rs > /dev/null' 360/// 'cargo run --release -p rust-analyzer -- parse < ~/projects/rustbench/parser.rs > /dev/null'
361/// ``` 361/// ```
362#[derive(Debug)] 362#[derive(Debug)]
363pub struct CpuProfiler { 363pub struct CpuProfiler {
diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml
index 83db943fe..cb72972c5 100644
--- a/crates/ra_syntax/Cargo.toml
+++ b/crates/ra_syntax/Cargo.toml
@@ -22,7 +22,7 @@ ra_text_edit = { path = "../ra_text_edit" }
22ra_parser = { path = "../ra_parser" } 22ra_parser = { path = "../ra_parser" }
23 23
24# This crate transitively depends on `smol_str` via `rowan`. 24# This crate transitively depends on `smol_str` via `rowan`.
25# ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here 25# ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here
26# to reduce number of compilations 26# to reduce number of compilations
27smol_str = { version = "0.1.12", features = ["serde"] } 27smol_str = { version = "0.1.12", features = ["serde"] }
28serde = { version = "1", features = ["derive"] } 28serde = { version = "1", features = ["derive"] }
diff --git a/crates/ra_tt/Cargo.toml b/crates/ra_tt/Cargo.toml
index b8dceb92a..c9601fdcc 100644
--- a/crates/ra_tt/Cargo.toml
+++ b/crates/ra_tt/Cargo.toml
@@ -8,6 +8,6 @@ authors = ["rust-analyzer developers"]
8doctest = false 8doctest = false
9 9
10[dependencies] 10[dependencies]
11# ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here 11# ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here
12# to reduce number of compilations 12# to reduce number of compilations
13smol_str = { version = "0.1.12", features = ["serde"] } 13smol_str = { version = "0.1.12", features = ["serde"] }
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 151ca3da5..3dae43d2a 100644
--- a/crates/ra_lsp_server/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -1,6 +1,6 @@
1[package] 1[package]
2edition = "2018" 2edition = "2018"
3name = "ra_lsp_server" 3name = "rust-analyzer"
4version = "0.1.0" 4version = "0.1.0"
5authors = ["rust-analyzer developers"] 5authors = ["rust-analyzer developers"]
6autobins = false 6autobins = false
@@ -9,7 +9,7 @@ autobins = false
9doctest = false 9doctest = false
10 10
11[[bin]] 11[[bin]]
12name = "ra_lsp_server" 12name = "rust-analyzer"
13path = "./src/bin/main.rs" 13path = "./src/bin/main.rs"
14 14
15[dependencies] 15[dependencies]
diff --git a/crates/ra_lsp_server/build.rs b/crates/rust-analyzer/build.rs
index 05f9772c0..05f9772c0 100644
--- a/crates/ra_lsp_server/build.rs
+++ b/crates/rust-analyzer/build.rs
diff --git a/crates/ra_lsp_server/src/bin/args.rs b/crates/rust-analyzer/src/bin/args.rs
index 3890fe13a..5ad3963a2 100644
--- a/crates/ra_lsp_server/src/bin/args.rs
+++ b/crates/rust-analyzer/src/bin/args.rs
@@ -5,7 +5,7 @@
5 5
6use anyhow::{bail, Result}; 6use anyhow::{bail, Result};
7use pico_args::Arguments; 7use pico_args::Arguments;
8use ra_lsp_server::cli::{BenchWhat, Position, Verbosity}; 8use rust_analyzer::cli::{BenchWhat, Position, Verbosity};
9 9
10use std::{fmt::Write, path::PathBuf}; 10use std::{fmt::Write, path::PathBuf};
11 11
@@ -74,7 +74,7 @@ impl Args {
74ra-cli-parse 74ra-cli-parse
75 75
76USAGE: 76USAGE:
77 ra_lsp_server parse [FLAGS] 77 rust-analyzer parse [FLAGS]
78 78
79FLAGS: 79FLAGS:
80 -h, --help Prints help inforamtion 80 -h, --help Prints help inforamtion
@@ -94,7 +94,7 @@ FLAGS:
94ra-cli-symbols 94ra-cli-symbols
95 95
96USAGE: 96USAGE:
97 ra_lsp_server highlight [FLAGS] 97 rust-analyzer highlight [FLAGS]
98 98
99FLAGS: 99FLAGS:
100 -h, --help Prints help inforamtion" 100 -h, --help Prints help inforamtion"
@@ -113,7 +113,7 @@ FLAGS:
113ra-cli-highlight 113ra-cli-highlight
114 114
115USAGE: 115USAGE:
116 ra_lsp_server highlight [FLAGS] 116 rust-analyzer highlight [FLAGS]
117 117
118FLAGS: 118FLAGS:
119 -h, --help Prints help information 119 -h, --help Prints help information
@@ -133,7 +133,7 @@ FLAGS:
133ra-cli-analysis-stats 133ra-cli-analysis-stats
134 134
135USAGE: 135USAGE:
136 ra_lsp_server analysis-stats [FLAGS] [OPTIONS] [PATH] 136 rust-analyzer analysis-stats [FLAGS] [OPTIONS] [PATH]
137 137
138FLAGS: 138FLAGS:
139 -h, --help Prints help information 139 -h, --help Prints help information
@@ -168,10 +168,10 @@ ARGS:
168 if matches.contains(["-h", "--help"]) { 168 if matches.contains(["-h", "--help"]) {
169 eprintln!( 169 eprintln!(
170 "\ 170 "\
171ra_lsp_server-analysis-bench 171rust-analyzer-analysis-bench
172 172
173USAGE: 173USAGE:
174 ra_lsp_server analysis-bench [FLAGS] [OPTIONS] [PATH] 174 rust-analyzer analysis-bench [FLAGS] [OPTIONS] [PATH]
175 175
176FLAGS: 176FLAGS:
177 -h, --help Prints help information 177 -h, --help Prints help information
@@ -207,7 +207,7 @@ ARGS:
207ra-cli 207ra-cli
208 208
209USAGE: 209USAGE:
210 ra_lsp_server <SUBCOMMAND> 210 rust-analyzer <SUBCOMMAND>
211 211
212FLAGS: 212FLAGS:
213 -h, --help Prints help information 213 -h, --help Prints help information
diff --git a/crates/ra_lsp_server/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs
index e25d54a0d..69e709a25 100644
--- a/crates/ra_lsp_server/src/bin/main.rs
+++ b/crates/rust-analyzer/src/bin/main.rs
@@ -4,8 +4,8 @@
4mod args; 4mod args;
5 5
6use lsp_server::Connection; 6use lsp_server::Connection;
7use ra_lsp_server::{cli, from_json, show_message, Result, ServerConfig};
8use ra_prof; 7use ra_prof;
8use rust_analyzer::{cli, from_json, show_message, Result, ServerConfig};
9 9
10use crate::args::HelpPrinted; 10use crate::args::HelpPrinted;
11 11
@@ -51,7 +51,7 @@ fn run_server() -> Result<()> {
51 log::info!("lifecycle: server started"); 51 log::info!("lifecycle: server started");
52 52
53 let (connection, io_threads) = Connection::stdio(); 53 let (connection, io_threads) = Connection::stdio();
54 let server_capabilities = serde_json::to_value(ra_lsp_server::server_capabilities()).unwrap(); 54 let server_capabilities = serde_json::to_value(rust_analyzer::server_capabilities()).unwrap();
55 55
56 let initialize_params = connection.initialize(server_capabilities)?; 56 let initialize_params = connection.initialize(server_capabilities)?;
57 let initialize_params = 57 let initialize_params =
@@ -84,7 +84,7 @@ fn run_server() -> Result<()> {
84 }) 84 })
85 .unwrap_or_default(); 85 .unwrap_or_default();
86 86
87 ra_lsp_server::main_loop( 87 rust_analyzer::main_loop(
88 workspace_roots, 88 workspace_roots,
89 initialize_params.capabilities, 89 initialize_params.capabilities,
90 server_config, 90 server_config,
diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/rust-analyzer/src/caps.rs
index c4711076c..c4711076c 100644
--- a/crates/ra_lsp_server/src/caps.rs
+++ b/crates/rust-analyzer/src/caps.rs
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/rust-analyzer/src/cargo_target_spec.rs
index 53751aafb..53751aafb 100644
--- a/crates/ra_lsp_server/src/cargo_target_spec.rs
+++ b/crates/rust-analyzer/src/cargo_target_spec.rs
diff --git a/crates/ra_lsp_server/src/cli.rs b/crates/rust-analyzer/src/cli.rs
index c9738d101..c9738d101 100644
--- a/crates/ra_lsp_server/src/cli.rs
+++ b/crates/rust-analyzer/src/cli.rs
diff --git a/crates/ra_lsp_server/src/cli/analysis_bench.rs b/crates/rust-analyzer/src/cli/analysis_bench.rs
index 91855e592..91855e592 100644
--- a/crates/ra_lsp_server/src/cli/analysis_bench.rs
+++ b/crates/rust-analyzer/src/cli/analysis_bench.rs
diff --git a/crates/ra_lsp_server/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs
index 99ab6e443..99ab6e443 100644
--- a/crates/ra_lsp_server/src/cli/analysis_stats.rs
+++ b/crates/rust-analyzer/src/cli/analysis_stats.rs
diff --git a/crates/ra_lsp_server/src/cli/load_cargo.rs b/crates/rust-analyzer/src/cli/load_cargo.rs
index 8cd08ecb6..8cd08ecb6 100644
--- a/crates/ra_lsp_server/src/cli/load_cargo.rs
+++ b/crates/rust-analyzer/src/cli/load_cargo.rs
diff --git a/crates/ra_lsp_server/src/cli/progress_report.rs b/crates/rust-analyzer/src/cli/progress_report.rs
index 31867a1e9..31867a1e9 100644
--- a/crates/ra_lsp_server/src/cli/progress_report.rs
+++ b/crates/rust-analyzer/src/cli/progress_report.rs
diff --git a/crates/ra_lsp_server/src/config.rs b/crates/rust-analyzer/src/config.rs
index 3314269ec..3314269ec 100644
--- a/crates/ra_lsp_server/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/rust-analyzer/src/conv.rs
index 90ef74056..90ef74056 100644
--- a/crates/ra_lsp_server/src/conv.rs
+++ b/crates/rust-analyzer/src/conv.rs
diff --git a/crates/ra_lsp_server/src/diagnostics.rs b/crates/rust-analyzer/src/diagnostics.rs
index e7924f0a3..e7924f0a3 100644
--- a/crates/ra_lsp_server/src/diagnostics.rs
+++ b/crates/rust-analyzer/src/diagnostics.rs
diff --git a/crates/ra_lsp_server/src/lib.rs b/crates/rust-analyzer/src/lib.rs
index 0dae30e46..0dae30e46 100644
--- a/crates/ra_lsp_server/src/lib.rs
+++ b/crates/rust-analyzer/src/lib.rs
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 67d8a5f6f..dc16a234d 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -1,4 +1,4 @@
1//! The main loop of `ra_lsp_server` responsible for dispatching LSP 1//! The main loop of `rust-analyzer` responsible for dispatching LSP
2//! requests/replies and notifications back to the client. 2//! requests/replies and notifications back to the client.
3 3
4mod handlers; 4mod handlers;
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/rust-analyzer/src/main_loop/handlers.rs
index bb7bab372..bb7bab372 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/rust-analyzer/src/main_loop/handlers.rs
diff --git a/crates/ra_lsp_server/src/main_loop/pending_requests.rs b/crates/rust-analyzer/src/main_loop/pending_requests.rs
index 73b33e419..73b33e419 100644
--- a/crates/ra_lsp_server/src/main_loop/pending_requests.rs
+++ b/crates/rust-analyzer/src/main_loop/pending_requests.rs
diff --git a/crates/ra_lsp_server/src/main_loop/subscriptions.rs b/crates/rust-analyzer/src/main_loop/subscriptions.rs
index bee6437cf..bee6437cf 100644
--- a/crates/ra_lsp_server/src/main_loop/subscriptions.rs
+++ b/crates/rust-analyzer/src/main_loop/subscriptions.rs
diff --git a/crates/ra_lsp_server/src/markdown.rs b/crates/rust-analyzer/src/markdown.rs
index 76bef45cc..76bef45cc 100644
--- a/crates/ra_lsp_server/src/markdown.rs
+++ b/crates/rust-analyzer/src/markdown.rs
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/rust-analyzer/src/req.rs
index 7ff7f60b3..7ff7f60b3 100644
--- a/crates/ra_lsp_server/src/req.rs
+++ b/crates/rust-analyzer/src/req.rs
diff --git a/crates/ra_lsp_server/src/vfs_glob.rs b/crates/rust-analyzer/src/vfs_glob.rs
index 91b33f94e..91b33f94e 100644
--- a/crates/ra_lsp_server/src/vfs_glob.rs
+++ b/crates/rust-analyzer/src/vfs_glob.rs
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/rust-analyzer/src/world.rs
index 96efab844..96efab844 100644
--- a/crates/ra_lsp_server/src/world.rs
+++ b/crates/rust-analyzer/src/world.rs
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/rust-analyzer/tests/heavy_tests/main.rs
index 9ca31cbcc..3af63d9cf 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/main.rs
+++ b/crates/rust-analyzer/tests/heavy_tests/main.rs
@@ -7,7 +7,7 @@ use lsp_types::{
7 PartialResultParams, Position, Range, TextDocumentItem, TextDocumentPositionParams, 7 PartialResultParams, Position, Range, TextDocumentItem, TextDocumentPositionParams,
8 WorkDoneProgressParams, 8 WorkDoneProgressParams,
9}; 9};
10use ra_lsp_server::req::{ 10use rust_analyzer::req::{
11 CodeActionParams, CodeActionRequest, Completion, CompletionParams, DidOpenTextDocument, 11 CodeActionParams, CodeActionRequest, Completion, CompletionParams, DidOpenTextDocument,
12 Formatting, OnEnter, Runnables, RunnablesParams, 12 Formatting, OnEnter, Runnables, RunnablesParams,
13}; 13};
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/rust-analyzer/tests/heavy_tests/support.rs
index d5ea52fa9..5b90b3218 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/support.rs
+++ b/crates/rust-analyzer/tests/heavy_tests/support.rs
@@ -19,7 +19,7 @@ use serde_json::{to_string_pretty, Value};
19use tempfile::TempDir; 19use tempfile::TempDir;
20use test_utils::{find_mismatch, parse_fixture}; 20use test_utils::{find_mismatch, parse_fixture};
21 21
22use ra_lsp_server::{main_loop, req, ServerConfig}; 22use rust_analyzer::{main_loop, req, ServerConfig};
23 23
24pub struct Project<'a> { 24pub struct Project<'a> {
25 fixture: &'a str, 25 fixture: &'a str,
diff --git a/docs/dev/README.md b/docs/dev/README.md
index ba24524f2..8d7e18010 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -80,7 +80,7 @@ In general, I use one of the following workflows for fixing bugs and
80implementing features. 80implementing features.
81 81
82If the problem concerns only internal parts of rust-analyzer (ie, I don't need 82If the problem concerns only internal parts of rust-analyzer (ie, I don't need
83to touch `ra_lsp_server` crate or typescript code), there is a unit-test for it. 83to touch `rust-analyzer` crate or typescript code), there is a unit-test for it.
84So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and 84So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and
85then just do printf-driven development/debugging. As a sanity check after I'm 85then just do printf-driven development/debugging. As a sanity check after I'm
86done, I use `cargo xtask install --server` and **Reload Window** action in VS 86done, I use `cargo xtask install --server` and **Reload Window** action in VS
@@ -88,17 +88,17 @@ Code to sanity check that the thing works as I expect.
88 88
89If the problem concerns only the VS Code extension, I use **Run Extension** 89If the problem concerns only the VS Code extension, I use **Run Extension**
90launch configuration from `launch.json`. Notably, this uses the usual 90launch configuration from `launch.json`. Notably, this uses the usual
91`ra_lsp_server` binary from `PATH`. For this it is important to have the following 91`rust-analyzer` binary from `PATH`. For this it is important to have the following
92in `setting.json` file: 92in `setting.json` file:
93```json 93```json
94{ 94{
95 "rust-analyzer.raLspServerPath": "ra_lsp_server" 95 "rust-analyzer.serverPath": "rust-analyzer"
96} 96}
97``` 97```
98After I am done with the fix, I use `cargo 98After I am done with the fix, I use `cargo
99xtask install --client-code` to try the new extension for real. 99xtask install --client-code` to try the new extension for real.
100 100
101If I need to fix something in the `ra_lsp_server` crate, I feel sad because it's 101If I need to fix something in the `rust-analyzer` crate, I feel sad because it's
102on the boundary between the two processes, and working there is slow. I usually 102on the boundary between the two processes, and working there is slow. I usually
103just `cargo xtask install --server` and poke changes from my live environment. 103just `cargo xtask install --server` and poke changes from my live environment.
104Note that this uses `--release`, which is usually faster overall, because 104Note that this uses `--release`, which is usually faster overall, because
@@ -113,7 +113,7 @@ communication, and `print!` would break it.
113If I need to fix something simultaneously in the server and in the client, I 113If I need to fix something simultaneously in the server and in the client, I
114feel even more sad. I don't have a specific workflow for this case. 114feel even more sad. I don't have a specific workflow for this case.
115 115
116Additionally, I use `cargo run --release -p ra_lsp_server -- analysis-stats 116Additionally, I use `cargo run --release -p rust-analyzer -- analysis-stats
117path/to/some/rust/crate` to run a batch analysis. This is primarily useful for 117path/to/some/rust/crate` to run a batch analysis. This is primarily useful for
118performance optimizations, or for bug minimization. 118performance optimizations, or for bug minimization.
119 119
@@ -148,7 +148,7 @@ There's also two VS Code commands which might be of interest:
148* `Rust Analyzer: Status` shows some memory-usage statistics. To take full 148* `Rust Analyzer: Status` shows some memory-usage statistics. To take full
149 advantage of it, you need to compile rust-analyzer with jemalloc support: 149 advantage of it, you need to compile rust-analyzer with jemalloc support:
150 ``` 150 ```
151 $ cargo install --path crates/ra_lsp_server --force --features jemalloc 151 $ cargo install --path crates/rust-analyzer --force --features jemalloc
152 ``` 152 ```
153 153
154 There's an alias for this: `cargo xtask install --server --jemalloc`. 154 There's an alias for this: `cargo xtask install --server --jemalloc`.
@@ -170,12 +170,12 @@ In particular, I have `export RA_PROFILE='*>10'` in my shell profile.
170To measure time for from-scratch analysis, use something like this: 170To measure time for from-scratch analysis, use something like this:
171 171
172``` 172```
173$ cargo run --release -p ra_lsp_server -- analysis-stats ../chalk/ 173$ cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
174``` 174```
175 175
176For measuring time of incremental analysis, use either of these: 176For measuring time of incremental analysis, use either of these:
177 177
178``` 178```
179$ cargo run --release -p ra_lsp_server -- analysis-bench ../chalk/ --highlight ../chalk/chalk-engine/src/logic.rs 179$ cargo run --release -p rust-analyzer -- analysis-bench ../chalk/ --highlight ../chalk/chalk-engine/src/logic.rs
180$ cargo run --release -p ra_lsp_server -- analysis-bench ../chalk/ --complete ../chalk/chalk-engine/src/logic.rs:94:0 180$ cargo run --release -p rust-analyzer -- analysis-bench ../chalk/ --complete ../chalk/chalk-engine/src/logic.rs:94:0
181``` 181```
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 41c3909f7..0343b6c81 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -134,7 +134,7 @@ APIs in this crate are IDE centric: they take text offsets as input and produce
134offsets and strings as output. This works on top of rich code model powered by 134offsets and strings as output. This works on top of rich code model powered by
135`hir`. 135`hir`.
136 136
137### `crates/ra_lsp_server` 137### `crates/rust-analyzer`
138 138
139An LSP implementation which wraps `ra_ide` into a language server protocol. 139An LSP implementation which wraps `ra_ide` into a language server protocol.
140 140
@@ -153,7 +153,7 @@ Rust Analyzer has three interesting [systems
153boundaries](https://www.tedinski.com/2018/04/10/making-tests-a-positive-influence-on-design.html) 153boundaries](https://www.tedinski.com/2018/04/10/making-tests-a-positive-influence-on-design.html)
154to concentrate tests on. 154to concentrate tests on.
155 155
156The outermost boundary is the `ra_lsp_server` crate, which defines an LSP 156The outermost boundary is the `rust-analyzer` crate, which defines an LSP
157interface in terms of stdio. We do integration testing of this component, by 157interface in terms of stdio. We do integration testing of this component, by
158feeding it with a stream of LSP requests and checking responses. These tests are 158feeding it with a stream of LSP requests and checking responses. These tests are
159known as "heavy", because they interact with Cargo and read real files from 159known as "heavy", because they interact with Cargo and read real files from
@@ -162,7 +162,7 @@ in a statically typed language, it's hard to make an error in the protocol
162itself if messages are themselves typed. 162itself if messages are themselves typed.
163 163
164The middle, and most important, boundary is `ra_ide`. Unlike 164The middle, and most important, boundary is `ra_ide`. Unlike
165`ra_lsp_server`, which exposes API, `ide` uses Rust API and is intended to 165`rust-analyzer`, which exposes API, `ide` uses Rust API and is intended to
166use by various tools. Typical test creates an `AnalysisHost`, calls some 166use by various tools. Typical test creates an `AnalysisHost`, calls some
167`Analysis` functions and compares the results against expectation. 167`Analysis` functions and compares the results against expectation.
168 168
diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md
index e6b082156..bece6a572 100644
--- a/docs/dev/debugging.md
+++ b/docs/dev/debugging.md
@@ -22,8 +22,8 @@ where **only** the `rust-analyzer` extension being debugged is enabled.
22 22
23## Debug TypeScript VSCode extension 23## Debug TypeScript VSCode extension
24 24
25- `Run Extension` - runs the extension with the globally installed `ra_lsp_server` binary. 25- `Run Extension` - runs the extension with the globally installed `rust-analyzer` binary.
26- `Run Extension (Dev Server)` - runs extension with the locally built LSP server (`target/debug/ra_lsp_server`). 26- `Run Extension (Dev Server)` - runs extension with the locally built LSP server (`target/debug/rust-analyzer`).
27 27
28TypeScript debugging is configured to watch your source edits and recompile. 28TypeScript debugging is configured to watch your source edits and recompile.
29To apply changes to an already running debug process press <kbd>Ctrl+Shift+P</kbd> and run the following command in your `[Extension Development Host]` 29To apply changes to an already running debug process press <kbd>Ctrl+Shift+P</kbd> and run the following command in your `[Extension Development Host]`
@@ -47,13 +47,13 @@ To apply changes to an already running debug process press <kbd>Ctrl+Shift+P</kb
47 debug = 2 47 debug = 2
48 ``` 48 ```
49 49
50- Select `Run Extension (Dev Server)` to run your locally built `target/debug/ra_lsp_server`. 50- Select `Run Extension (Dev Server)` to run your locally built `target/debug/rust-analyzer`.
51 51
52- In the original VSCode window once again select the `Attach To Server` debug configuration. 52- In the original VSCode window once again select the `Attach To Server` debug configuration.
53 53
54- A list of running processes should appear. Select the `ra_lsp_server` from this repo. 54- A list of running processes should appear. Select the `rust-analyzer` from this repo.
55 55
56- Navigate to `crates/ra_lsp_server/src/main_loop.rs` and add a breakpoint to the `on_task` function. 56- Navigate to `crates/rust-analyzer/src/main_loop.rs` and add a breakpoint to the `on_task` function.
57 57
58- Go back to the `[Extension Development Host]` instance and hover over a Rust variable and your breakpoint should hit. 58- Go back to the `[Extension Development Host]` instance and hover over a Rust variable and your breakpoint should hit.
59 59
@@ -64,15 +64,15 @@ To apply changes to an already running debug process press <kbd>Ctrl+Shift+P</kb
64 64
65## Troubleshooting 65## Troubleshooting
66 66
67### Can't find the `ra_lsp_server` process 67### Can't find the `rust-analyzer` process
68 68
69It could be a case of just jumping the gun. 69It could be a case of just jumping the gun.
70 70
71The `ra_lsp_server` is only started once the `onLanguage:rust` activation. 71The `rust-analyzer` is only started once the `onLanguage:rust` activation.
72 72
73Make sure you open a rust file in the `[Extension Development Host]` and try again. 73Make sure you open a rust file in the `[Extension Development Host]` and try again.
74 74
75### Can't connect to `ra_lsp_server` 75### Can't connect to `rust-analyzer`
76 76
77Make sure you have run `echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope`. 77Make sure you have run `echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope`.
78 78
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc
index 8f741aaa9..74fda0abe 100644
--- a/docs/user/readme.adoc
+++ b/docs/user/readme.adoc
@@ -64,14 +64,14 @@ To make VS Code use the freshly build server, add this to the settings:
64 64
65[source,json] 65[source,json]
66---- 66----
67{ "rust-analyzer.raLspServerPath": "ra_lsp_server" } 67{ "rust-analyzer.serverPath": "rust-analyzer" }
68---- 68----
69 69
70Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually. 70Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually.
71 71
72=== Language Server Binary 72=== Language Server Binary
73 73
74Other editors generally require `ra_lsp_server` binary to be in `$PATH`. 74Other editors generally require `rust-analyzer` binary to be in `$PATH`.
75You can download pre-build binary from 75You can download pre-build binary from
76https://github.com/rust-analyzer/rust-analyzer/releases[releases] 76https://github.com/rust-analyzer/rust-analyzer/releases[releases]
77page, or you can install it from source using the following command: 77page, or you can install it from source using the following command:
@@ -102,7 +102,7 @@ The are several LSP client implementations for vim:
1022. Run `:CocInstall coc-rust-analyzer` to install 1022. Run `:CocInstall coc-rust-analyzer` to install
103 https://github.com/fannheyward/coc-rust-analyzer[coc-rust-analyzer], 103 https://github.com/fannheyward/coc-rust-analyzer[coc-rust-analyzer],
104 this extension implements _most_ of the features supported in the VSCode extension: 104 this extension implements _most_ of the features supported in the VSCode extension:
105 * same configurations as VSCode extension, `rust-analyzer.raLspServerPath`, `rust-analyzer.enableCargoWatchOnStartup` etc. 105 * same configurations as VSCode extension, `rust-analyzer.serverPath`, `rust-analyzer.enableCargoWatchOnStartup` etc.
106 * same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.startCargoWatch` etc. 106 * same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.startCargoWatch` etc.
107 * highlighting and inlay_hints are not implemented yet 107 * highlighting and inlay_hints are not implemented yet
108 108
@@ -117,7 +117,7 @@ The are several LSP client implementations for vim:
117[source,vim] 117[source,vim]
118---- 118----
119let g:LanguageClient_serverCommands = { 119let g:LanguageClient_serverCommands = {
120\ 'rust': ['ra_lsp_server'], 120\ 'rust': ['rust-analyzer'],
121\ } 121\ }
122---- 122----
123 123
@@ -142,7 +142,7 @@ Installation:
142[source,json] 142[source,json]
143---- 143----
144"rust-analyzer": { 144"rust-analyzer": {
145 "command": ["ra_lsp_server"], 145 "command": ["rust-analyzer"],
146 "languageId": "rust", 146 "languageId": "rust",
147 "scopes": ["source.rust"], 147 "scopes": ["source.rust"],
148 "syntaxes": [ 148 "syntaxes": [
diff --git a/editors/code/package.json b/editors/code/package.json
index 002293b2e..c498c14b4 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -179,13 +179,13 @@
179 "default": {}, 179 "default": {},
180 "description": "Fine grained feature flags to disable annoying features" 180 "description": "Fine grained feature flags to disable annoying features"
181 }, 181 },
182 "rust-analyzer.raLspServerPath": { 182 "rust-analyzer.serverPath": {
183 "type": [ 183 "type": [
184 "null", 184 "null",
185 "string" 185 "string"
186 ], 186 ],
187 "default": null, 187 "default": null,
188 "description": "Path to ra_lsp_server executable (points to bundled binary by default)" 188 "description": "Path to rust-analyzer executable (points to bundled binary by default)"
189 }, 189 },
190 "rust-analyzer.excludeGlobs": { 190 "rust-analyzer.excludeGlobs": {
191 "type": "array", 191 "type": "array",
@@ -245,7 +245,7 @@
245 "Full log" 245 "Full log"
246 ], 246 ],
247 "default": "off", 247 "default": "off",
248 "description": "Trace requests to the ra_lsp_server" 248 "description": "Trace requests to the rust-analyzer"
249 }, 249 },
250 "rust-analyzer.lruCapacity": { 250 "rust-analyzer.lruCapacity": {
251 "type": [ 251 "type": [
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index fab062dda..347c989c4 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -76,7 +76,7 @@ export class Config {
76 } 76 }
77 77
78 /** 78 /**
79 * Name of the binary artifact for `ra_lsp_server` that is published for 79 * Name of the binary artifact for `rust-analyzer` that is published for
80 * `platform` on GitHub releases. (It is also stored under the same name when 80 * `platform` on GitHub releases. (It is also stored under the same name when
81 * downloaded by the extension). 81 * downloaded by the extension).
82 */ 82 */
@@ -91,12 +91,12 @@ export class Config {
91 case "arm": 91 case "arm":
92 case "arm64": return null; 92 case "arm64": return null;
93 93
94 default: return "ra_lsp_server-linux"; 94 default: return "rust-analyzer-linux";
95 } 95 }
96 } 96 }
97 97
98 case "darwin": return "ra_lsp_server-mac"; 98 case "darwin": return "rust-analyzer-mac";
99 case "win32": return "ra_lsp_server-windows.exe"; 99 case "win32": return "rust-analyzer-windows.exe";
100 100
101 // Users on these platforms yet need to manually build from sources 101 // Users on these platforms yet need to manually build from sources
102 case "aix": 102 case "aix":
@@ -111,7 +111,7 @@ export class Config {
111 } 111 }
112 112
113 get serverSource(): null | BinarySource { 113 get serverSource(): null | BinarySource {
114 const serverPath = RA_LSP_DEBUG ?? this.cfg.get<null | string>("raLspServerPath"); 114 const serverPath = RA_LSP_DEBUG ?? this.cfg.get<null | string>("serverPath");
115 115
116 if (serverPath) { 116 if (serverPath) {
117 return { 117 return {
diff --git a/editors/code/src/installation/server.ts b/editors/code/src/installation/server.ts
index 80cb719e3..6e730fbfc 100644
--- a/editors/code/src/installation/server.ts
+++ b/editors/code/src/installation/server.ts
@@ -29,7 +29,7 @@ export async function ensureServerBinary(source: null | BinarySource): Promise<n
29 29
30 vscode.window.showErrorMessage( 30 vscode.window.showErrorMessage(
31 `Unable to run ${source.path} binary. ` + 31 `Unable to run ${source.path} binary. ` +
32 `To use the pre-built language server, set "rust-analyzer.raLspServerPath" ` + 32 `To use the pre-built language server, set "rust-analyzer.serverPath" ` +
33 "value to `null` or remove it from the settings to use it by default." 33 "value to `null` or remove it from the settings to use it by default."
34 ); 34 );
35 return null; 35 return null;
diff --git a/xtask/src/install.rs b/xtask/src/install.rs
index 91426377f..cc6fecc85 100644
--- a/xtask/src/install.rs
+++ b/xtask/src/install.rs
@@ -39,7 +39,7 @@ impl InstallCmd {
39 " 39 "
40 Installation complete. 40 Installation complete.
41 41
42 Add `\"rust-analyzer.raLspServerPath\": \"ra_lsp_server\",` to VS Code settings, 42 Add `\"rust-analyzer.serverPath\": \"rust-analyzer\",` to VS Code settings,
43 otherwise it will use the latest release from GitHub. 43 otherwise it will use the latest release from GitHub.
44" 44"
45 ) 45 )
@@ -142,7 +142,7 @@ fn install_server(opts: ServerOpt) -> Result<()> {
142 } 142 }
143 143
144 let jemalloc = if opts.jemalloc { "--features jemalloc" } else { "" }; 144 let jemalloc = if opts.jemalloc { "--features jemalloc" } else { "" };
145 let res = run!("cargo install --path crates/ra_lsp_server --locked --force {}", jemalloc); 145 let res = run!("cargo install --path crates/rust-analyzer --locked --force {}", jemalloc);
146 146
147 if res.is_err() && old_rust { 147 if res.is_err() && old_rust {
148 eprintln!( 148 eprintln!(