question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect newline indentation in struct literals

See original GitHub issue

When typing a struct literal, pressing Enter at the end of the last field line does not indent the new empty line correctly.

For example:

SomeStruct {
    foo: 1,
    bar: 2,<cursor>
}

Pressing Enter at <cursor> results in the following:

SomeStruct {
    foo: 1,
    bar: 2,
<cursor>
}

Whereas I would expect this instead:

SomeStruct {
    foo: 1,
    bar: 2,
    <cursor>
}

I believe this was working in an earlier version of the plugin. I’m currently using v0.1.0.2064.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
doxxxcommented, Aug 20, 2017

Sorry, confirmed that it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keeping code structure with string literal that uses whitespace
If I have a multi-line string literal in my program, is there anyway to keep the indentation of my code consistent without adding...
Read more >
`mandatory_comma: true` incorrectly indents the next line at ...
Comma is inserted after "b" and square bracket on line below is indented to the same level as the array element. A subsequent...
Read more >
[Review] SE-0168: Multi-Line String Literals - Swift Forums
Hello Swift community, The review of SE-0168 "Multi-Line String Literals" begins now ... or a newline and indentation, between array and dictionary literal...
Read more >
Appendix: YAML Techniques - Helm
Appendix: YAML Techniques. Most of this guide has been focused on writing the template language. Here, we'll look at the YAML format. YAML...
Read more >
Zig Language Reference
This syntax tells the Zig compiler that the function will either return an error or a value. An error union type combines an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found