Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Auto-indentation breaks on braceless scopes #51

Open
SylvainBigonneau opened this issue Aug 19, 2014 · 2 comments
Open

Auto-indentation breaks on braceless scopes #51

SylvainBigonneau opened this issue Aug 19, 2014 · 2 comments

Comments

@SylvainBigonneau
Copy link

This issue can include this earlier one.

It seems that a lack of braces break the auto indentation. For example:

if (true)
  i = 1;
else
  i = 2;

Turns into:

if (true)
  i = 1;
  else
    i = 2;
@janwo
Copy link

janwo commented Jan 14, 2015

This is a really annoying bug and opened on August already. Will be there a fix soon?

@afanasy
Copy link

afanasy commented Jan 17, 2015

As far as I can see it can be fixed by adding appropriate "decreaseIndentPattern" here:
https://github.com/atom/language-javascript/blob/master/settings/language-javascript.cson
but I'm not sure how to make the pattern that looks for two lines back (and finds the braceless scope).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants