From 91f262e4f106f6e633fba3dbf15684655dac1238 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 25 Oct 2021 21:12:36 +0200 Subject: Add rust into my dev box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- .bashrc | 8 ++++++++ .doom.d/init.el | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index f0c37e4..a6b8dcf 100644 --- a/.bashrc +++ b/.bashrc @@ -156,3 +156,11 @@ export XDG_CONFIG_HOME="$HOME/.config" # Add the binaries of Doom Emacs into my PATH. export PATH=$PATH:$HOME/.emacs.d/bin + +# If we have Rust's source code, export the special `RUST_SRC_PATH`, since this +# is useful for completion tools. +if command -v rustc &> /dev/null; then + if [ -d "$(rustc --print sysroot)/lib/rustlib/src/rust/library" ]; then + export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/library" + fi +fi diff --git a/.doom.d/init.el b/.doom.d/init.el index dd850ae..853c296 100644 --- a/.doom.d/init.el +++ b/.doom.d/init.el @@ -145,7 +145,7 @@ ;;rest ; Emacs as a REST client ;;rst ; ReST in peace (ruby +rails +rvm) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor -- cgit v1.2.3