about summary refs log tree commit diff
path: root/src/etc/rust_analyzer_helix.toml
blob: e2de2a374cbed53b4b381b3c24b9751422af8e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This config uses a separate build directory for rust-analyzer,
# so that r-a's checks don't block user `x` commands and vice-verse.
# R-a's build directory is located in `build-rust-analyzer`.
#
# To build rustfmt and proc macro server for r-a run the following command:
# ```
# x b proc-macro-srv-cli rustfmt --stage 0 --build-dir build-rust-analyzer
# ```

[language-server.rust-analyzer.config]
linkedProjects = [
    "Cargo.toml",
    "compiler/rustc_codegen_cranelift/Cargo.toml",
    "compiler/rustc_codegen_gcc/Cargo.toml",
    "library/Cargo.toml",
    "src/bootstrap/Cargo.toml",
    "src/tools/rust-analyzer/Cargo.toml",
]

[language-server.rust-analyzer.config.check]
invocationLocation = "root"
invocationStrategy = "once"
overrideCommand = [
    "python3",
    "x.py",
    "check",
    "--json-output",
    "--build-dir",
    "build-rust-analyzer",
]

[language-server.rust-analyzer.config.rustfmt]
overrideCommand = [
    "build-rust-analyzer/host/rustfmt/bin/rustfmt",
    "--edition=2024"
]

[language-server.rust-analyzer.config.procMacro]
server = "build-rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
enable = true

[language-server.rust-analyzer.config.rustc]
source = "./Cargo.toml"

[language-server.rust-analyzer.config.cargo]
sysrootSrc = "./library"

[language-server.rust-analyzer.config.cargo.extraEnv]
RUSTC_BOOTSTRAP = "1"

[language-server.rust-analyzer.config.cargo.buildScripts]
enable = true
invocationLocation = "root"
invocationStrategy = "once"
overrideCommand = [
    "python3",
    "x.py",
    "check",
    "--json-output",
    "--build-dir",
    "build-rust-analyzer",
    "--compile-time-deps",
]