cargo-mode
cargo-mode copied to clipboard
inherit buffer environment when running cargo commands
I'm using this cargo mode with envrc.el. The issue is when running cargo commands, cargo-mode use a temporary buffer and doesn't pick environment variables from current buffer, this results in cargo command using wrong binaries for cargo-clippy.
The author of envrc.el made a library called inheritenv.el to address this.
I can do this to pickup local environment variables
(use-package inheritenv
:ensure t
:config (inheritenv-add-advice 'cargo-mode--start-cmd))
But it would be nice to have this built into cargo-mode.