racer-rust / emacs-racer

Racer support for Emacs
398 stars 48 forks source link

Make `racer-rust-src-path` optional, as racer can now query rustc #54

Closed ccmtaylor closed 7 years ago

ccmtaylor commented 8 years ago

Since phildawes/racer#598, racer has a sensible default for the rust source path. Emacs-racer could rely this and make racer-rust-src-path (and the RUST_SRC_PATH environment variable) optional.

Wilfred commented 8 years ago

Duplicate of #53 I think. Let me know if I'm mistaken.

ccmtaylor commented 8 years ago

@Wilfred I don't think this is a duplicate. IIUC, the current behaviour falls back to /usr/local/src/rust/src if neither $RUST_SRC_PATH nor racer-rust-src-path are set.

However, since phildawes/racer#598 landed, the racer command automatically discovers the rust-src location by calling rustc --print sysroot, which plays nicely with rustup's new capability to install rust sources.

My proposal is

This would simplify emacs-racer setup, since you don't need to configure anything if you use rustup.

If you like, I can try to hack up a PR, but I'm not experienced in elisp.

Wilfred commented 7 years ago

Done in #72.