diff options
Diffstat (limited to '.emacs.d/lisp/rust-common.el')
| -rw-r--r-- | .emacs.d/lisp/rust-common.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.emacs.d/lisp/rust-common.el b/.emacs.d/lisp/rust-common.el new file mode 100644 index 0000000..b7dd695 --- /dev/null +++ b/.emacs.d/lisp/rust-common.el | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | ;;; rust-common.el --- Common code for both modes -*-lexical-binding: t-*- | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;; rust-common code for both prog-mode and tree-sitter one | ||
| 5 | |||
| 6 | ;;; Code: | ||
| 7 | (require 'rust-rustfmt) | ||
| 8 | |||
| 9 | (defcustom rust-before-save-hook 'rust-before-save-method | ||
| 10 | "Function for formatting before save." | ||
| 11 | :type 'function | ||
| 12 | :group 'rust-mode) | ||
| 13 | |||
| 14 | (defcustom rust-after-save-hook 'rust-after-save-method | ||
| 15 | "Default method to handle rustfmt invocation after save." | ||
| 16 | :type 'function | ||
| 17 | :group 'rust-mode) | ||
| 18 | |||
| 19 | (provide 'rust-common) | ||
| 20 | ;;; rust-common.el ends here | ||
