about summary refs log tree commit diff
path: root/src/etc/rust_analyzer_eglot.el
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/rust_analyzer_eglot.el')
-rw-r--r--src/etc/rust_analyzer_eglot.el29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/etc/rust_analyzer_eglot.el b/src/etc/rust_analyzer_eglot.el
new file mode 100644
index 00000000000..e55d80d98de
--- /dev/null
+++ b/src/etc/rust_analyzer_eglot.el
@@ -0,0 +1,29 @@
+((rustic-mode
+  .((eglot-workspace-configuration
+     . (:rust-analyzer
+        ( :check ( :invocationLocation "root"
+                   :invocationStrategy "once"
+                   :overrideCommand ["python3"
+                                     "x.py"
+                                     "check"
+                                     "--json-output"])
+          :linkedProjects ["Cargo.toml"
+                           "src/tools/x/Cargo.toml"
+                           "src/bootstrap/Cargo.toml"
+                           "src/tools/rust-analyzer/Cargo.toml"
+                           "compiler/rustc_codegen_cranelift/Cargo.toml"
+                           "compiler/rustc_codegen_gcc/Cargo.toml"]
+          :rustfmt ( :overrideCommand ["build/host/rustfmt/bin/rustfmt"
+                                       "--edition=2021"])
+          :procMacro ( :server "build/host/stage0/libexec/rust-analyzer-proc-macro-srv"
+                       :enable t)
+          :cargo ( :buildScripts ( :enable t
+                                   :invocationLocation "root"
+                                   :invocationStrategy "once"
+                                   :overrideCommand ["python3"
+                                                     "x.py"
+                                                     "check"
+                                                     "--json-output"])
+                   :sysrootSrc "./library"
+                   :extraEnv (:RUSTC_BOOTSTRAP "1"))
+          :rustc ( :source "./Cargo.toml" )))))))