Make rust use XDG directories

Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
Severin Kaderli 2019-02-12 22:32:00 +01:00
parent 606ca1e914
commit e2594c49f6
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
2 changed files with 15 additions and 3 deletions

View file

@ -26,8 +26,18 @@ NPM_PACKAGES=(
"npm-check-updates" "npm-check-updates"
) )
RUST_COMPONENTS=(
"rls-preview"
"rustfmt-preview"
)
####################################### #######################################
# Main code # Main code
####################################### #######################################
print_header "Installing global npm packages" print_header "Installing global npm packages"
npm i -g "${NPM_PACKAGES[@]}" npm i -g "${NPM_PACKAGES[@]}"
print_header "Install Rust toolchain and components"
rustup toolchain install beta
rustup default beta
rustup component add "${RUST_COMPONENTS[@]}"

View file

@ -23,13 +23,15 @@ export HTTPIE_CONFIG_DIR="${XDG_CONFIG_HOME}/httpie"
export XAUTHORITY="${XDG_RUNTIME_DIR}/Xauthority" export XAUTHORITY="${XDG_RUNTIME_DIR}/Xauthority"
export WGETRC="${XDG_CONFIG_HOME}/wget/wgetrc" export WGETRC="${XDG_CONFIG_HOME}/wget/wgetrc"
export VIMINIT=":source ${XDG_CONFIG_HOME}/vim/vimrc" export VIMINIT=":source ${XDG_CONFIG_HOME}/vim/vimrc"
export CARGO_HOME="${XDG_DATA_HOME}/cargo"
export RUSTUP_HOME="${XDG_DATA_HOME}/rustup"
# Bash # Bash
export HISTCONTROL=ignoreboth export HISTCONTROL=ignoreboth
export HISTSIZE=1000 export HISTSIZE=1000
export HISTFILESIZE=2000 export HISTFILESIZE=2000
# Setting default editor and terminal # Setting applications
export VISUAL=vim export VISUAL=vim
export EDITOR="$VISUAL" export EDITOR="$VISUAL"
export TERMINAL=termite export TERMINAL=termite
@ -50,7 +52,7 @@ export npm_config_prefix="$HOME/.node_modules"
export GOPATH=$HOME/go export GOPATH=$HOME/go
# Adding folders to the PATH variable # Adding folders to the PATH variable
export PATH="$PATH:$HOME/bin:$npm_config_prefix/bin:$GOPATH/bin:$HOME/.config/composer/vendor/bin" export PATH="${PATH}:${CARGO_HOME}/bin:${HOME}/bin:${npm_config_prefix}/bin:${GOPATH/}bin:${HOME}/.config/composer/vendor/bin"
# Set bash prompt # Set bash prompt
set_bash_prompt() { set_bash_prompt() {