diff options
| author | Simeon Simeonov | 2024-03-14 22:27:34 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2024-03-14 22:27:34 +0100 |
| commit | 236114bdeab5edab09969e5ad398c32c2738dead (patch) | |
| tree | 42b337b433de9ada45f2aa441833c5cde42c3a1e /.emacs.d/lisp/rust-common.el | |
| parent | 9fffbc025f80ef22a77ccc62f53baa990568b214 (diff) | |
Upgrade markdown-mode, rust and yasnippet
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 | ||
