I have a vanilla Spacemacs setup and in my user-config I have set js2-basic-offset to 2. I have also placed this before in my user-init with no luck as well.

I can verify this in my window using SPC h d v which it shows to be 2.

Yet, in my .js files it continues to indent 4 spaces. My spacemacs shows "Javascript" for the major mode in the modeline bar.

Any ideas on what I am doing wrong/how I can debug this?


Turns out I needed js-level-indent because I was in js-mode. Still unsure how I ended up in js-mode and not js2-mode.

  • 2
    Can you accept your own answer? – syl20bnr Dec 10 '16 at 20:34
  • Unfortunately, I don't see the option.. – Adam Thompson Feb 13 '17 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.