Issues with indentation


Hey mates,

Since yesterday night, I have a weird issue on indentation.
In fact, the automatic indentation seems to be borken as you can see on this GIF :

I wanted to have the emacs’s like indentation but I didn’t find packages which were working and could have probably fixed my issue.

Do you guys have any ideas ?

Thanks in advance.


What grammar do you have active in the example?



Thanks for the answer.

Are you talking about this :


Yes. The indentation rules are in the associated language package, which does not have an allowance for the sort of thing you’re doing. You could fork or wrap it and add ^if\s?\(.+\) or something similar to increase the indent pattern, but you might have to manually delete the indentation when you want to get out of that, because the matcher isn’t smart enough to determine when you’re leaving an if statement that only has one line inside it. A package would be able to look further and be smart about that.



Well the fact is that it was working somedays ago. I was using emacs’s like indent with and it was working properly until fex days.

The owner warned about this package been considered deprecated but it was still working so, I really don’t understand.

Another interesting point is that the auto indent is done on my case if the ‘if’ isn’t in a while loop.


Did Atom update recently?

Another interesting point is that the auto indent is done on my case if the ‘if’ isn’t in a while loop.

That’s important. What other circumstances enable the auto-indent to work correctly?

Also important is the fact that you have a package that you knew about and didn’t mention.


Well, an update has been done the 15th but it doesn’t look like to be the
original of my issue.

It looks like the only one.


Well, it seems like a package issue. I don’t know what emacs-like indentation is and the package doesn’t say, so unless you can describe it, I can’t tell you how to emulate it.


No problem, I’ll continue to look for something to resolve this issue.
Thanks for your help dude !


No problem. :slight_smile:

Maybe something with snippets could simplify your life enough that the indentation isn’t an issue. If you want to pursue an function to make indentation behave the way you want it to, I could point you in the right direction.