Skip to content

Commit dd58ee3

Browse files
committed
synchronize helix/zed/vscode settings
1 parent d09726b commit dd58ee3

File tree

4 files changed

+59
-55
lines changed

4 files changed

+59
-55
lines changed

src/etc/rust_analyzer_eglot.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
((rustic-mode
22
.((eglot-workspace-configuration
33
. (:rust-analyzer
4-
( :check ( :invocationLocation "root"
5-
:invocationStrategy "once"
4+
( :check ( :invocationStrategy "once"
65
:overrideCommand ["python3"
76
"x.py"
87
"check"

src/etc/rust_analyzer_helix.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,10 @@ overrideCommand = [
6262
"--build-dir",
6363
"build-rust-analyzer",
6464
]
65+
66+
[language-server.rust-analyzer.environment]
67+
RUSTUP_TOOLCHAIN = "nightly"
68+
69+
[[language]]
70+
name = "rust"
71+
file-types = ["rs", "fixed", "pp", "mir"]

src/etc/rust_analyzer_settings.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
{
22
"git.detectSubmodulesLimit": 20,
3-
"rust-analyzer.check.invocationStrategy": "once",
4-
"rust-analyzer.check.overrideCommand": [
5-
"python3",
6-
"x.py",
7-
"check",
8-
"--build-dir",
9-
"build-rust-analyzer",
10-
"--json-output"
11-
],
123
"rust-analyzer.linkedProjects": [
134
"Cargo.toml",
145
"compiler/rustc_codegen_cranelift/Cargo.toml",
@@ -17,28 +8,37 @@
178
"src/bootstrap/Cargo.toml",
189
"src/tools/rust-analyzer/Cargo.toml"
1910
],
11+
"rust-analyzer.check.invocationStrategy": "once",
12+
"rust-analyzer.check.overrideCommand": [
13+
"python3",
14+
"x.py",
15+
"check",
16+
"--json-output",
17+
"--build-dir",
18+
"build-rust-analyzer"
19+
],
2020
"rust-analyzer.rustfmt.overrideCommand": [
21-
"${workspaceFolder}/build-rust-analyzer/host/rustfmt/bin/rustfmt",
21+
"${workspaceFolder}/build/host/rustfmt/bin/rustfmt",
2222
"--edition=2024"
2323
],
24-
"rust-analyzer.procMacro.server": "${workspaceFolder}/build-rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv",
24+
"rust-analyzer.procMacro.server": "${workspaceFolder}/build/host/stage0/libexec/rust-analyzer-proc-macro-srv",
2525
"rust-analyzer.procMacro.enable": true,
26+
"rust-analyzer.rustc.source": "./Cargo.toml",
27+
"rust-analyzer.cargo.sysrootSrc": "./library",
28+
"rust-analyzer.cargo.extraEnv": {
29+
"RUSTC_BOOTSTRAP": "1"
30+
},
2631
"rust-analyzer.cargo.buildScripts.enable": true,
2732
"rust-analyzer.cargo.buildScripts.invocationStrategy": "once",
2833
"rust-analyzer.cargo.buildScripts.overrideCommand": [
2934
"python3",
3035
"x.py",
3136
"check",
32-
"--build-dir",
33-
"build-rust-analyzer",
3437
"--json-output",
3538
"--compile-time-deps"
39+
"--build-dir",
40+
"build-rust-analyzer",
3641
],
37-
"rust-analyzer.cargo.sysrootSrc": "./library",
38-
"rust-analyzer.rustc.source": "./Cargo.toml",
39-
"rust-analyzer.cargo.extraEnv": {
40-
"RUSTC_BOOTSTRAP": "1"
41-
},
4242
"rust-analyzer.server.extraEnv": {
4343
"RUSTUP_TOOLCHAIN": "nightly"
4444
},

src/etc/rust_analyzer_zed.json

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,15 @@
22
"lsp": {
33
"rust-analyzer": {
44
"initialization_options": {
5-
"cargo": {
6-
"buildScripts": {
7-
"enable": true,
8-
"invocationLocation": "root",
9-
"invocationStrategy": "once",
10-
"overrideCommand": [
11-
"python3",
12-
"x.py",
13-
"check",
14-
"--build-dir",
15-
"build-rust-analyzer",
16-
"--compile-time-deps",
17-
"--json-output"
18-
]
19-
},
20-
"extraEnv": {
21-
"RUSTC_BOOTSTRAP": "1"
22-
},
23-
"sysrootSrc": "./library"
24-
},
5+
"linkedProjects": [
6+
"Cargo.toml",
7+
"compiler/rustc_codegen_cranelift/Cargo.toml",
8+
"compiler/rustc_codegen_gcc/Cargo.toml",
9+
"library/Cargo.toml",
10+
"src/bootstrap/Cargo.toml",
11+
"src/tools/rust-analyzer/Cargo.toml"
12+
],
2513
"check": {
26-
"invocationLocation": "root",
2714
"invocationStrategy": "once",
2815
"overrideCommand": [
2916
"python3",
@@ -34,26 +21,37 @@
3421
"build-rust-analyzer"
3522
]
3623
},
37-
"linkedProjects": [
38-
"Cargo.toml",
39-
"compiler/rustc_codegen_cranelift/Cargo.toml",
40-
"compiler/rustc_codegen_gcc/Cargo.toml",
41-
"library/Cargo.toml",
42-
"src/bootstrap/Cargo.toml",
43-
"src/tools/rust-analyzer/Cargo.toml"
44-
],
24+
"rustfmt": {
25+
"overrideCommand": [
26+
"build/host/rustfmt/bin/rustfmt",
27+
"--edition=2024"
28+
]
29+
},
4530
"procMacro": {
4631
"enable": true,
47-
"server": "build-rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
32+
"server": "build/host/stage0/libexec/rust-analyzer-proc-macro-srv"
4833
},
4934
"rustc": {
5035
"source": "./Cargo.toml"
5136
},
52-
"rustfmt": {
53-
"overrideCommand": [
54-
"build-rust-analyzer/host/rustfmt/bin/rustfmt",
55-
"--edition=2024"
56-
]
37+
"cargo": {
38+
"sysrootSrc": "./library",
39+
"extraEnv": {
40+
"RUSTC_BOOTSTRAP": "1"
41+
},
42+
"buildScripts": {
43+
"enable": true,
44+
"invocationStrategy": "once",
45+
"overrideCommand": [
46+
"python3",
47+
"x.py",
48+
"check",
49+
"--json-output"
50+
"--compile-time-deps",
51+
"--build-dir",
52+
"build-rust-analyzer",
53+
]
54+
}
5755
},
5856
"server": {
5957
"extraEnv": {

0 commit comments

Comments
 (0)