Open miguelbarao opened 3 years ago
PATHs on macOS are tricky. I'm guessing you are launching Sublime from Spotlight or Finder. Those only inherit the environment from the system, and doesn't include anything set in your shell startup.
RustEnhanced uses shellenv
to slurp the environment from your shell settings. Make sure that rust_include_shell_env
is enabled in the RustEnhanced settings (that is the default, so it should be enabled unless you disabled it). I also think Sublime has some built-in support for sourcing your shell startup, but I don't remember how that works.
Are you maybe using zsh? I haven't tested that, and it is possible shellenv doesn't support it.
There are some workarounds:
rust_env
setting in the RustEnhanced settings to set PATH.subl
) from your shell.Yes, rust_include_shell_env
is set to true
and I'm on zsh
.
Setting rust_env
to the example provided in the default configuration did the trick. Maybe a note could be added to the install instructions specifically for MacOS.
Thanks for the help!
Is rust_env
available in the current build of the plugin available on Package Control? It's not a recognised setting for me, and setting rust_env
does not appear to have any effect. (I'm not on OS X, but I am using Cargo/Rustup without having $PATH
set by the shell.)
I'm sorry, this was resolved by removing and reinstalling the plugin. The rest of the issue lies with the language server plugin.
Sublime Text 3 (Build 3211)
Rust Enhanced Version 2.22
Operating system MacOS 10.15.7
Actual behavior
After installing Rust Enhanced, it is not working in the editor and running rust code with Cmd+B shows a message in the sublime console:
cargo
was installed with rustup and is in my path. It works in the terminal. Is there a specific path that needs to be define somewhere? I did the same install steps in Linux and it's working correctly.Complete traceback of the error: