Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move indent level to rust-common #538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dev380
Copy link
Contributor

@Dev380 Dev380 commented Apr 13, 2024

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.

I'm not sure why more of the rust-prog-mode variables aren't in the rust-common file so I left them there. But, this was the only variable that was causing breakage for me. There is a rust-ts-mode-indent-offset variable too (which is also 4 by default) - should rust-mode override that variable with this one, override the rust-mode variable with the tree sitter one when the tree sitter mode is on, or keep them independent?

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.
@@ -16,5 +16,11 @@
:type 'function
:group 'rust-mode)

(defcustom rust-indent-offset 4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of moving it here, do you think a defvaralias should be instead created. Something similar to this: https://github.com/psibi/rustic/blob/4dac7f34c30d91e3ecb2602fff7e81b6efdc75d7/rustic.el#L52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants