summaryrefslogtreecommitdiff
path: root/rust-common.el
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2024-02-25 10:31:22 +0530
committerSibi Prabakaran <sibi@psibi.in>2024-02-25 10:31:22 +0530
commita73d8266a950413fea56f070065aea6a3076cd1e (patch)
tree9699c66fcd28183acbd0093dbe00484e93e09d3b /rust-common.el
parent25c2535a11fbf34f47078730abfad6f8ae2c9376 (diff)
downloadrust-mode-a73d8266a950413fea56f070065aea6a3076cd1e.tar.gz
Fix rust-mode and tree sitter integration
Diffstat (limited to 'rust-common.el')
-rw-r--r--rust-common.el18
1 files changed, 18 insertions, 0 deletions
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