diff --git a/.dir-locals.el b/.dir-locals.el index cccbb8c..b3e56f1 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -3,12 +3,12 @@ (rust-cargo-default-arguments . "-r") (eglot-workspace-configuration . (:rust-analyzer (:check - (:overrideCommand ["ninja" "clippy-json" "-C" "build"])))) + (:overrideCommand ["./rust-analyzer.sh"])))) (eval . (add-to-list 'eglot-server-programs '((rust-ts-mode rust-mode) . ("rust-analyzer" :initializationOptions (:check - (:overrideCommand ["ninja" "clippy-json" "-C" "build"])))))) + (:overrideCommand ["./rust-analyzer.sh"])))))) (eval . (eglot-ensure)) (eval . (company-mode 1)) (eval . (add-hook 'before-save-hook 'fmt-current-buffer nil t)) diff --git a/rust-analyzer.sh b/rust-analyzer.sh new file mode 100755 index 0000000..a1240b2 --- /dev/null +++ b/rust-analyzer.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# this script is a temporary workaround for not having a proper clippy-json target + +source /etc/profile + +cd build || exit $? + +# compile as far as we can +ninja + +ninja clippy-json