File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change
1
+ # This config uses a separate build directory for rust-analyzer,
2
+ # so that r-a's checks don't block user `x` commands and vice-verse.
3
+ # R-a's build directory is located in `build/rust-analyzer`.
4
+ #
5
+ # To build rustfmt and proc macro server for r-a run the following command:
6
+ # ```
7
+ # x b proc-macro-srv-cli rustfmt --stage 0 --build-dir build/rust-analyzer
8
+ # ```
9
+
1
10
[language-server .rust-analyzer .config ]
2
11
linkedProjects = [
3
12
" Cargo.toml" ,
@@ -17,16 +26,18 @@ overrideCommand = [
17
26
" x.py" ,
18
27
" check" ,
19
28
" --json-output" ,
29
+ " --build-dir" ,
30
+ " build/rust-analyzer" ,
20
31
]
21
32
22
33
[language-server .rust-analyzer .config .rustfmt ]
23
34
overrideCommand = [
24
- " build- rust-analyzer/host/rustfmt/bin/rustfmt" ,
35
+ " build/ rust-analyzer/host/rustfmt/bin/rustfmt" ,
25
36
" --edition=2021"
26
37
]
27
38
28
39
[language-server .rust-analyzer .config .procMacro ]
29
- server = " build- rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
40
+ server = " build/ rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
30
41
enable = true
31
42
32
43
[language-server .rust-analyzer .config .rustc ]
@@ -47,4 +58,6 @@ overrideCommand = [
47
58
" x.py" ,
48
59
" check" ,
49
60
" --json-output" ,
61
+ " --build-dir" ,
62
+ " build/rust-analyzer" ,
50
63
]
You can’t perform that action at this time.
0 commit comments