-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lists of dictionaries are not indented correctly #49
Comments
Um, have you tried hitting the TAB key repeatedly? It should cycle between the following positions (with foo:
- bar: baz
| | | This way you start with the right position, change to the middle, then the left one. For the record, |
@wasamasa Thanks for looking into this. I am aware that the changes outlined above are not the correct way to do this, which is I why I didn't open a PR against this repo. I simply wanted to provide a bit of context. What would be a good approach to change the order in which the positions are being suggested? |
|
I'm seeing the following indentation behaviour when using yaml-mode:
I yaml-mode to indent like:
This seems to be related to
yaml-nested-sequence-re
and the way it is being used inyaml-compute-indentation
as either of the following changes fixes/changes this particular behaviour:yaml-nested-sequence-re
to only match lines that end with:
The following regular expression results in the "correct" behaviour in this particular case.
Unsurprisingly removing the yaml-nested-sequence-re check from yaml-compute-indentation to yield the following also results in the correct indentation of the snippet above.
Paired with #24 it appears as if the indentation framework needs to be more context sensitive like python-mode.
The text was updated successfully, but these errors were encountered: