From a73d8266a950413fea56f070065aea6a3076cd1e Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sun, 25 Feb 2024 10:31:22 +0530 Subject: Fix rust-mode and tree sitter integration --- rust-common.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rust-common.el (limited to 'rust-common.el') diff --git a/rust-common.el b/rust-common.el new file mode 100644 index 0000000..c216264 --- /dev/null +++ b/rust-common.el @@ -0,0 +1,18 @@ +;;; rust-common.el --- Common code for both modes -*-lexical-binding: t-*- +;;; Commentary: + +;; rust-common code for both prog-mode and tree-sitter one + +;;; Code: +(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.2.3