diff options
author | tdro <tdro@users.noreply.github.com> | 2020-08-14 21:25:02 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2020-08-14 21:25:02 -0400 |
commit | a1174a335a0b54c18bb04a4f4a777d1ea0a21e19 (patch) | |
tree | a74c1738c5739a2e8e11b6e9c47176daaf7c6dcb | |
parent | 24a2925ca8a338c8eb09a1407b9c9c8b443bb7a0 (diff) | |
download | dotfiles-a1174a335a0b54c18bb04a4f4a777d1ea0a21e19.tar.gz dotfiles-a1174a335a0b54c18bb04a4f4a777d1ea0a21e19.tar.bz2 dotfiles-a1174a335a0b54c18bb04a4f4a777d1ea0a21e19.zip |
.vimrc: Rust format and REPL
-rw-r--r-- | .bash_profile | 2 | ||||
-rw-r--r-- | .config/nixpkgs/config.nix | 2 | ||||
-rw-r--r-- | .vimrc | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/.bash_profile b/.bash_profile index c44ca37..d9f2610 100644 --- a/.bash_profile +++ b/.bash_profile @@ -45,6 +45,8 @@ export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat" export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" +export CARGO_HOME="$XDG_CACHE_HOME/cargo" +export RUSTUP_HOME="$XDG_DATA_HOME/rustup" # themes export DESKTOP_SESSION=gnome diff --git a/.config/nixpkgs/config.nix b/.config/nixpkgs/config.nix index 95bb2b7..3ecdf80 100644 --- a/.config/nixpkgs/config.nix +++ b/.config/nixpkgs/config.nix @@ -324,7 +324,7 @@ in Rust = pkgs.buildEnv { name = "rust"; - paths = [ rustup ]; + paths = [ evcxr rustup ]; }; }; } @@ -291,6 +291,7 @@ augroup AutoCommands autocmd BufWritePost *.yml :call AnsibleCheck() autocmd FileType bash,sh autocmd! BufWritePost <buffer> :call ShellCheck() autocmd FileType nix autocmd! BufWritePost <buffer> silent call NixCheck() + autocmd FileType rust autocmd! BufWritePost <buffer> silent !notify-send "$(rustfmt % 2>&1 && echo 'rustfmt OK:' %)" " REPL commands autocmd FileType go noremap <buffer> <leader>cc :REPL gore<cr> @@ -298,6 +299,7 @@ augroup AutoCommands autocmd FileType php noremap <buffer> <leader>cc :REPL psysh<cr> autocmd FileType elixir noremap <buffer> <leader>cc :REPL iex<cr> autocmd FileType sh noremap <buffer> <leader>cc :REPL dash -x<cr> + autocmd FileType rust noremap <buffer> <leader>cc :REPL evcxr<cr> autocmd FileType nix noremap <buffer> <leader>cc :REPL nix repl<cr> autocmd FileType bash noremap <buffer> <leader>cc :REPL bash -x<cr> autocmd FileType python noremap <buffer> <leader>cc :REPL python<cr> |