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

too much decrease of brace identation #118

@mdaisuke

Description

@mdaisuke

Prerequisites

Description

Go's brace auto identation looks workng a little wrong.
like below

atom-go-brace-ng

Then I read some code in atom/language-go and found the setting of increaseIndentPattern is precisely set.
https://github.com/atom/language-go/blob/master/settings/language-go.cson#L4

So there might be some wrong config applied?

But it works okay if copy and paste below to config.cson of Atom editor.

".go.source":
  editor:
    commentStart: "// "
    decreaseIndentPattern: "^\\s*(\\bcase\\b.*:|\\bdefault\\b:|}[),]?|\\)[,]?)$"

like this

atom-go-brace-ok

Steps to Reproduce

see gifs above.

Versions

Atom    : 1.15.0
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0

�apm  1.15.3
npm  3.10.5
node 4.4.5 x64
python 3.6.0
git 2.11.0

Additional information

I tried this on safe mode and factory default, but is reproduced.

I have no idea where something's working wrong, so if you have some advice about where I should check on this to me, I'll try to fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions