glynnforrest / salt-mode

Emacs major mode for Salt States
GNU General Public License v3.0
22 stars 5 forks source link

First line is indented if it ends in a colon #4

Closed wwentland closed 7 years ago

wwentland commented 7 years ago

When entering the following content yaml-mode currently indents wrongly.

--- expected
foo:
  - bar: baz
  - foo: 1
--- yaml-mode
foo:
  - bar: baz
    - foo: 1
--- salt-mode
  foo:
    - bar: baz
      - foo: 1

The indentation of sequence elements seems to be broken in yaml-mode also (cf. https://github.com/yoshiki/yaml-mode/issues/49) but the incorrect indentation of the first line appears to be specific to salt-mode and is rather irritating given that a SLS often starts like that :)

glynnforrest commented 7 years ago

@babilen I've just pushed a commit which should fix this. Please re-open if it doesn't.

wwentland commented 7 years ago

It does indeed. Thank you!