You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently the mode uses js-indent-level for indenting when you press newline, but json-reformat:indent-level when calling that format function. Then of course there's also js2-basic-offset. Lots of variables, a bit confusing. Maybe better to unify?
The text was updated successfully, but these errors were encountered:
I don't see it really coming in anywhere, it's just another variable that might add to the confusion. Maybe another option would be a configuration option to tell which indent to inherit from. I use js2-mode for JavaScript development, and was using js-mode for JSON until I found this (simply because it's the default).
Alternatively, maybe just better documentation would fix this. I didn't see anything about js-indent-level controlling the indentation of json-mode when hitting newline until I discovered it myself. Reading the documentation led me to believe that it would work if I set the json-reformat:indent-level variable.
Apparently the mode uses js-indent-level for indenting when you press newline, but json-reformat:indent-level when calling that format function. Then of course there's also js2-basic-offset. Lots of variables, a bit confusing. Maybe better to unify?
The text was updated successfully, but these errors were encountered: