From 236114bdeab5edab09969e5ad398c32c2738dead Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 14 Mar 2024 22:27:34 +0100 Subject: Upgrade markdown-mode, rust and yasnippet --- .emacs.d/lisp/rust-common.el | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .emacs.d/lisp/rust-common.el (limited to '.emacs.d/lisp/rust-common.el') 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 @@ +;;; rust-common.el --- Common code for both modes -*-lexical-binding: t-*- +;;; Commentary: + +;; rust-common code for both prog-mode and tree-sitter one + +;;; Code: +(require 'rust-rustfmt) + +(defcustom rust-before-save-hook 'rust-before-save-method + "Function for formatting before save." + :type 'function + :group 'rust-mode) + +(defcustom rust-after-save-hook 'rust-after-save-method + "Default method to handle rustfmt invocation after save." + :type 'function + :group 'rust-mode) + +(provide 'rust-common) +;;; rust-common.el ends here -- cgit v1.3