Closed matianhe3 closed 3 years ago
You'll probably need to make your environment variables visible to Emacs. The example setup uses the https://github.com/purcell/exec-path-from-shell package for that, see https://github.com/rksm/emacs-rust-config/blob/master/init.el#L126.
You'll probably need to make your environment variables visible to Emacs. The example setup uses the https://github.com/purcell/exec-path-from-shell package for that, see https://github.com/rksm/emacs-rust-config/blob/master/init.el#L126.
i already installed. and other bash can execute.
Is emacs able to resolve the paths when you eval (Alt-:
) the following expressions?
(executable-find "cargo")
(executable-find "rustc")
(executable-find "rust-analyzer")
Looking at your error messages, it seems that is not the issue. But
[ERROR rust_analyzer::reload] failed to load workspace: "cargo" "--version" failed, exit code: 1
stderr:
error: no override and no default toolchain set
looks like you need to set a default rust toolchain, e.g.
$ rustup default stable
Looking at your error messages, it seems that is not the issue. But
[ERROR rust_analyzer::reload] failed to load workspace: "cargo" "--version" failed, exit code: 1 stderr: error: no override and no default toolchain set
looks like you need to set a default rust toolchain, e.g.
$ rustup default stable
execute find:
"/Users/matianhe/.config/cargo/bin/cargo"
user-error: Minibuffer window is not active
"/Users/matianhe/.config/cargo/bin/rustc"
"/Users/matianhe/.config/cargo/bin/rust-analyzer"
~/m/work ❯❯❯ rustup default stable
info: using existing install for 'stable-x86_64-apple-darwin'
info: default toolchain set to 'stable-x86_64-apple-darwin'
stable-x86_64-apple-darwin unchanged - rustc 1.51.0 (2fd73fabe 2021-03-23)
thanks, but it not work.
i sovle it.
i reinstall rust . and set defaut ENV ~/.rustup ~/.cargo
. it run well.
i change ENV to ~/.config/rustup ~/.config/cargo
. it broken.
config:
In
Message
:IN
lsp-log
:IN
rust-analyzer::stderr
: