Rollup merge of #148930 - WaffleLapkin:config-tweaks2, r=mati865

tweak editor configs

r? mati865
This commit is contained in:
Matthias Krüger
2025-11-27 20:07:11 +01:00
committed by GitHub
5 changed files with 71 additions and 62 deletions
@@ -597,6 +597,7 @@ fn hashes(&self) -> &'static [&'static str] {
"080955765db84bb6cbf178879f489c4e2369397626a6ecb3debedb94a9d0b3ce",
"f501475c6654187091c924ae26187fa5791d74d4a8ab3fb61fbbe4c0275aade1",
"54bc48fe1996177f5eef86d7231b33978e6d8b737cb0a899e622b7e975c95308",
"08d30e455ceec6e01d9bcef8b9449f2ddd14d278ca8627cdad90e02d9f44e938",
],
EditorKind::Helix => &[
"2d3069b8cf1b977e5d4023965eb6199597755e6c96c185ed5f2854f98b83d233",
@@ -605,6 +606,7 @@ fn hashes(&self) -> &'static [&'static str] {
"198c195ed0c070d15907b279b8b4ea96198ca71b939f5376454f3d636ab54da5",
"1c43ead340b20792b91d02b08494ee68708e7e09f56b6766629b4b72079208f1",
"eec09a09452682060afd23dd5d3536ccac5615b3cdbf427366446901215fb9f6",
"cb653043852d9d5ff4a5be56407b859ff9928be055ad3f307eb309aad04765e6",
],
EditorKind::Vim | EditorKind::VsCode => &[
"ea67e259dedf60d4429b6c349a564ffcd1563cf41c920a856d1f5b16b4701ac8",
@@ -622,6 +624,7 @@ fn hashes(&self) -> &'static [&'static str] {
"701b73751efd7abd6487f2c79348dab698af7ac4427b79fa3d2087c867144b12",
"a61df796c0c007cb6512127330564e49e57d558dec715703916a928b072a1054",
"02a49ac2d31f00ef6e4531c44e00dac51cea895112e480553f1ba060b3942a47",
"0aa4748848de0d1cb7ece92a0123c8897fef6de2f58aff8fda1426f098b7a798",
],
EditorKind::Zed => &[
"bbce727c269d1bd0c98afef4d612eb4ce27aea3c3a8968c5f10b31affbc40b6c",
@@ -630,6 +633,7 @@ fn hashes(&self) -> &'static [&'static str] {
"4fadd4c87389a601a27db0d3d74a142fa3a2e656ae78982e934dbe24bee32ad6",
"f0bb3d23ab1a49175ab0ef5c4071af95bb03d01d460776cdb716d91333443382",
"5ef83292111d9a8bb63b6afc3abf42d0bc78fe24985f0d2e039e73258b5dab8f",
"74420c13094b530a986b37c4f1d23cb58c0e8e2295f5858ded129fb1574e66f9",
],
}
}
+1 -2
View File
@@ -1,8 +1,7 @@
((rustic-mode
.((eglot-workspace-configuration
. (:rust-analyzer
( :check ( :invocationLocation "root"
:invocationStrategy "once"
( :check ( :invocationStrategy "once"
:overrideCommand ["python3"
"x.py"
"check"
+15 -7
View File
@@ -2,10 +2,13 @@
# 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:
# To download rustfmt and proc macro server for r-a run the following command
# (proc macro server is downloaded automatically with pretty much any command,
# this specific one also downloads rustfmt):
# ```
# x b proc-macro-srv-cli rustfmt --stage 0 --build-dir build-rust-analyzer
# x fmt --check
# ```
# (if that doesn't work -- do `x clean` first)
[language-server.rust-analyzer.config]
linkedProjects = [
@@ -18,7 +21,6 @@ linkedProjects = [
]
[language-server.rust-analyzer.config.check]
invocationLocation = "root"
invocationStrategy = "once"
overrideCommand = [
"python3",
@@ -31,12 +33,12 @@ overrideCommand = [
[language-server.rust-analyzer.config.rustfmt]
overrideCommand = [
"build-rust-analyzer/host/rustfmt/bin/rustfmt",
"build/host/rustfmt/bin/rustfmt",
"--edition=2024"
]
[language-server.rust-analyzer.config.procMacro]
server = "build-rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
server = "build/host/stage0/libexec/rust-analyzer-proc-macro-srv"
enable = true
[language-server.rust-analyzer.config.rustc]
@@ -50,14 +52,20 @@ RUSTC_BOOTSTRAP = "1"
[language-server.rust-analyzer.config.cargo.buildScripts]
enable = true
invocationLocation = "root"
invocationStrategy = "once"
overrideCommand = [
"python3",
"x.py",
"check",
"--json-output",
"--compile-time-deps",
"--build-dir",
"build-rust-analyzer",
"--compile-time-deps",
]
[language-server.rust-analyzer.environment]
RUSTUP_TOOLCHAIN = "nightly"
[[language]]
name = "rust"
file-types = ["rs", "fixed", "pp", "mir"]
+18 -18
View File
@@ -1,14 +1,5 @@
{
"git.detectSubmodulesLimit": 20,
"rust-analyzer.check.invocationStrategy": "once",
"rust-analyzer.check.overrideCommand": [
"python3",
"x.py",
"check",
"--build-dir",
"build-rust-analyzer",
"--json-output"
],
"rust-analyzer.linkedProjects": [
"Cargo.toml",
"compiler/rustc_codegen_cranelift/Cargo.toml",
@@ -17,28 +8,37 @@
"src/bootstrap/Cargo.toml",
"src/tools/rust-analyzer/Cargo.toml"
],
"rust-analyzer.check.invocationStrategy": "once",
"rust-analyzer.check.overrideCommand": [
"python3",
"x.py",
"check",
"--json-output",
"--build-dir",
"build-rust-analyzer"
],
"rust-analyzer.rustfmt.overrideCommand": [
"${workspaceFolder}/build-rust-analyzer/host/rustfmt/bin/rustfmt",
"${workspaceFolder}/build/host/rustfmt/bin/rustfmt",
"--edition=2024"
],
"rust-analyzer.procMacro.server": "${workspaceFolder}/build-rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv",
"rust-analyzer.procMacro.server": "${workspaceFolder}/build/host/stage0/libexec/rust-analyzer-proc-macro-srv",
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.rustc.source": "./Cargo.toml",
"rust-analyzer.cargo.sysrootSrc": "./library",
"rust-analyzer.cargo.extraEnv": {
"RUSTC_BOOTSTRAP": "1"
},
"rust-analyzer.cargo.buildScripts.enable": true,
"rust-analyzer.cargo.buildScripts.invocationStrategy": "once",
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"python3",
"x.py",
"check",
"--build-dir",
"build-rust-analyzer",
"--json-output",
"--compile-time-deps"
"--build-dir",
"build-rust-analyzer",
],
"rust-analyzer.cargo.sysrootSrc": "./library",
"rust-analyzer.rustc.source": "./Cargo.toml",
"rust-analyzer.cargo.extraEnv": {
"RUSTC_BOOTSTRAP": "1"
},
"rust-analyzer.server.extraEnv": {
"RUSTUP_TOOLCHAIN": "nightly"
},
+33 -35
View File
@@ -2,28 +2,15 @@
"lsp": {
"rust-analyzer": {
"initialization_options": {
"cargo": {
"buildScripts": {
"enable": true,
"invocationLocation": "root",
"invocationStrategy": "once",
"overrideCommand": [
"python3",
"x.py",
"check",
"--build-dir",
"build-rust-analyzer",
"--compile-time-deps",
"--json-output"
]
},
"extraEnv": {
"RUSTC_BOOTSTRAP": "1"
},
"sysrootSrc": "./library"
},
"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"
],
"check": {
"invocationLocation": "root",
"invocationStrategy": "once",
"overrideCommand": [
"python3",
@@ -34,26 +21,37 @@
"build-rust-analyzer"
]
},
"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"
],
"rustfmt": {
"overrideCommand": [
"build/host/rustfmt/bin/rustfmt",
"--edition=2024"
]
},
"procMacro": {
"enable": true,
"server": "build-rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
"server": "build/host/stage0/libexec/rust-analyzer-proc-macro-srv"
},
"rustc": {
"source": "./Cargo.toml"
},
"rustfmt": {
"overrideCommand": [
"build-rust-analyzer/host/rustfmt/bin/rustfmt",
"--edition=2024"
]
"cargo": {
"sysrootSrc": "./library",
"extraEnv": {
"RUSTC_BOOTSTRAP": "1"
},
"buildScripts": {
"enable": true,
"invocationStrategy": "once",
"overrideCommand": [
"python3",
"x.py",
"check",
"--json-output"
"--compile-time-deps",
"--build-dir",
"build-rust-analyzer",
]
}
},
"server": {
"extraEnv": {