diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-12-03 16:18:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-12-04 16:59:47 +0000 |
commit | 697e110d14c352e7ab0164b856649fe7a455f403 (patch) | |
tree | b2f59b609d4d7a1301d823086a8537879dc874eb /modules/workstation/emacs | |
parent | c54fcc13c19b0edaf3b432c9674ebc18425207bd (diff) | |
download | nixlib-697e110d14c352e7ab0164b856649fe7a455f403.tar nixlib-697e110d14c352e7ab0164b856649fe7a455f403.tar.gz nixlib-697e110d14c352e7ab0164b856649fe7a455f403.tar.bz2 nixlib-697e110d14c352e7ab0164b856649fe7a455f403.tar.lz nixlib-697e110d14c352e7ab0164b856649fe7a455f403.tar.xz nixlib-697e110d14c352e7ab0164b856649fe7a455f403.tar.zst nixlib-697e110d14c352e7ab0164b856649fe7a455f403.zip |
modules/emacs: add Cargo keybindings
Diffstat (limited to 'modules/workstation/emacs')
-rw-r--r-- | modules/workstation/emacs/init.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/workstation/emacs/init.el b/modules/workstation/emacs/init.el index b3f5861c4be0..e78ad6b74c3d 100644 --- a/modules/workstation/emacs/init.el +++ b/modules/workstation/emacs/init.el @@ -95,8 +95,15 @@ (global-set-key (kbd "C-c r") 'revert-buffer) ;;; Rust ;;; +;; Indent with spaces in Rust code. (add-hook 'rust-mode-hook (lambda () (setq indent-tabs-mode nil))) +(with-eval-after-load 'rust-mode + ;; Cargo keybindings + (define-key rust-mode-map (kbd "C-c c b") 'rust-compile) + (define-key rust-mode-map (kbd "C-c c r") 'rust-run) + (define-key rust-mode-map (kbd "C-c c t") 'rust-test)) + ;;; save-some-buffers ;;; ;; Allow reverting buffers directly from the "Save file ...?" message. (add-to-list 'save-some-buffers-action-alist |