json-emacs / json-mode

Major mode for editing JSON files with emacs
314 stars 66 forks source link

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

Closed angrybacon closed 1 year ago

angrybacon commented 9 years ago

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 commented 8 years ago

Has anyone acknowledged this issue?

joshwnj commented 8 years ago

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:

Would that solve your case?

angrybacon commented 8 years ago

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 commented 1 year ago

This would solve this.

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