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

Can't have 2 different values for JS indent level and JSON indent level #32

Closed
angrybacon opened this issue May 8, 2015 · 4 comments
Closed

Comments

@angrybacon
Copy link

One month ago, you made a change that basically forbids me to have 4-spaces indenting with js-mode and 2-spaces indenting with json-mode.

@angrybacon
Copy link
Author

Has anyone acknowledged this issue?

@joshwnj
Copy link
Collaborator

joshwnj commented Mar 17, 2016

Sorry for the delay @angrybakon, this one slipped my radar. I'd like to figure out a good solution here. Do you think it would work well if we:

  • add a new json-indent-level, which is nil by default
  • when json-indent-level has a value we use it
  • otherwise we use js-indent-level

Would that solve your case?

@angrybacon
Copy link
Author

Yup, perfectly fine to me. Thank you :)

Sorry for the delay

It's ok, don't worry. I was only a bit concerned as I didn't see any activity on the repository.

@taku0
Copy link
Collaborator

taku0 commented Jul 17, 2023

This would solve this.

(add-hook 'json-mode-hook (lambda () (setq-local js-indent-level 2)))

@taku0 taku0 closed this as completed Jul 17, 2023
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

No branches or pull requests

3 participants