summaryrefslogtreecommitdiff
path: root/settings
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2021-06-09 18:28:30 -0700
committerbenj <benj@rse8.com>2021-06-09 18:28:30 -0700
commitf06ad4d1ee9338fc9b89010b52dd23f31f9b6232 (patch)
tree13cd637a868561f76abeea717314aee78aa9acec /settings
parente02a7489298b7aa667787cc9a531fe169e638499 (diff)
downloademacs-f06ad4d1ee9338fc9b89010b52dd23f31f9b6232.tar
emacs-f06ad4d1ee9338fc9b89010b52dd23f31f9b6232.tar.gz
emacs-f06ad4d1ee9338fc9b89010b52dd23f31f9b6232.tar.bz2
emacs-f06ad4d1ee9338fc9b89010b52dd23f31f9b6232.tar.lz
emacs-f06ad4d1ee9338fc9b89010b52dd23f31f9b6232.tar.xz
emacs-f06ad4d1ee9338fc9b89010b52dd23f31f9b6232.tar.zst
emacs-f06ad4d1ee9338fc9b89010b52dd23f31f9b6232.zip
rust -> rustic
Diffstat (limited to '')
-rw-r--r--settings/sane-defaults.el3
-rw-r--r--settings/setup-rust-mode.el6
-rw-r--r--settings/setup-rustic-mode.el9
3 files changed, 12 insertions, 6 deletions
diff --git a/settings/sane-defaults.el b/settings/sane-defaults.el
index a8bbd6d..3c316d1 100644
--- a/settings/sane-defaults.el
+++ b/settings/sane-defaults.el
@@ -145,6 +145,9 @@
;; Dired Settings
(setq dired-omit-mode t)
+;; which-key everywhere
+(setq which-key-mode t)
+
;; Override C-x C-c to open the default ansi-term buffer
;; 0. check if we are in GUI or user want to override behavior
;; 1. check if ansi-term buffer exists
diff --git a/settings/setup-rust-mode.el b/settings/setup-rust-mode.el
deleted file mode 100644
index c56cc3d..0000000
--- a/settings/setup-rust-mode.el
+++ /dev/null
@@ -1,6 +0,0 @@
-(setq rust-format-on-save t)
-
-(add-hook 'rust-mode-hook 'cargo-minor-mode t)
-
-(provide 'setup-rust-mode)
-;;; setup-rust-mode.el ends here
diff --git a/settings/setup-rustic-mode.el b/settings/setup-rustic-mode.el
new file mode 100644
index 0000000..382b910
--- /dev/null
+++ b/settings/setup-rustic-mode.el
@@ -0,0 +1,9 @@
+(defun rk/rustic-mode-hook ()
+ ;; so that run C-c C-c C-r works without having to confirm
+ (setq-local buffer-save-without-query t))
+
+(setq rustic-format-on-save t)
+(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)
+
+(provide 'setup-rustic-mode)
+;;; setup-rust-mode.el ends here