Skip to content

Commit 85f7bd2

Browse files
authored
Fix rust-analyzer helix config (#4199)
closes #4197
1 parent a18fffa commit 85f7bd2

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

tools/rust_analyzer/bin/setup.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,22 +1107,22 @@ const NEOVIM_LUA_RUSTFMT: &str = r#" rustfmt = {
11071107
const HELIX_TOML_TEMPLATE: &str = r#"[language-server.rust-analyzer]
11081108
command = "__RA_LAUNCHER__"
11091109
1110-
[language-server.rust-analyzer.config.rust-analyzer.workspace.discoverConfig]
1110+
[language-server.rust-analyzer.config.workspace.discoverConfig]
11111111
command = ["__DISCOVER_LAUNCHER__", "{arg}"]
11121112
progressLabel = "rules_rust"
11131113
filesToWatch = ["BUILD", "BUILD.bazel", "MODULE.bazel", "WORKSPACE", "WORKSPACE.bazel"]
11141114
__OPT_PROC_MACRO____OPT_RUSTFMT__
1115-
[language-server.rust-analyzer.config.rust-analyzer.lens]
1115+
[language-server.rust-analyzer.config.lens]
11161116
enable = true
11171117
"#;
11181118

11191119
const HELIX_TOML_PROC_MACRO: &str = r#"
1120-
[language-server.rust-analyzer.config.rust-analyzer.procMacro]
1120+
[language-server.rust-analyzer.config.procMacro]
11211121
server = "__PMS_LAUNCHER__"
11221122
"#;
11231123

11241124
const HELIX_TOML_RUSTFMT: &str = r#"
1125-
[language-server.rust-analyzer.config.rust-analyzer.rustfmt]
1125+
[language-server.rust-analyzer.config.rustfmt]
11261126
overrideCommand = ["__RUSTFMT_LAUNCHER__"]
11271127
"#;
11281128

@@ -1658,9 +1658,7 @@ mod tests {
16581658
.join(LAUNCHER_SUBDIR);
16591659
let snippet = generate_helix_toml(&ctx, &launcher_dir);
16601660
assert!(snippet.contains("[language-server.rust-analyzer]"));
1661-
assert!(snippet.contains(
1662-
"[language-server.rust-analyzer.config.rust-analyzer.workspace.discoverConfig]"
1663-
));
1661+
assert!(snippet.contains("[language-server.rust-analyzer.config.workspace.discoverConfig]"));
16641662
// rust-analyzer LSP path comes from the toolchain.
16651663
assert!(snippet.contains("/obase/external/ra/rust-analyzer"));
16661664
// discover sits next to the helix-specific launcher dir.

0 commit comments

Comments
 (0)