From 2c73e26f0635a2e258e80133e8e751830f3fbdd7 Mon Sep 17 00:00:00 2001 From: Dev380 <49997896+Dev380@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:41:34 -0400 Subject: [PATCH] fix: move indent level to rust-common Emacs complains that `rust-indent-offset` isn't set and a few minor modes (e.g. formatting, smartparens) stop working. This moves that variable to the common file so the treesitter mode has the variable set. --- rust-common.el | 6 ++++++ rust-prog-mode.el | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rust-common.el b/rust-common.el index b7dd695..ecc5b70 100644 --- a/rust-common.el +++ b/rust-common.el @@ -16,5 +16,11 @@ :type 'function :group 'rust-mode) +(defcustom rust-indent-offset 4 + "Indent Rust code by this number of spaces." + :type 'integer + :group 'rust-mode + :safe #'integerp) + (provide 'rust-common) ;;; rust-common.el ends here diff --git a/rust-prog-mode.el b/rust-prog-mode.el index 05bc5e0..64c3ed1 100644 --- a/rust-prog-mode.el +++ b/rust-prog-mode.el @@ -17,12 +17,6 @@ ("INFINITY" . ?∞) ("->" . ?→) ("=>" . ?⇒)) "Alist of symbol prettifications used for `prettify-symbols-alist'.") -(defcustom rust-indent-offset 4 - "Indent Rust code by this number of spaces." - :type 'integer - :group 'rust-mode - :safe #'integerp) - (defcustom rust-indent-method-chain nil "Indent Rust method chains, aligned by the `.' operators." :type 'boolean