Skip to content

Support formatting #12

Closed
Closed

Description

@DanTup
No description provided.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 4, 2016
  2. added this to the milestone on Aug 4, 2016
  3. self-assigned this
    on Aug 4, 2016
  4. skybrian commented on Oct 11, 2016

    @skybrian

    Is there something special I have to do to make 'format on save' work for Dart?

    I have VS Code 1.6.0 and Dart Code 0.11.2, and:

        "editor.formatOnSave": true,
        "files.autoSave": "onWindowChange",
    
  5. DanTup commented on Oct 11, 2016

    @DanTup
    MemberAuthor

    @skybrian

    I haven't tried this out yet, but does it work if you save explicitly? The release notes have this:

    Note: To keep cursors and selections stable, we don't format when saving after delay.

    but I'm not really sure what the delay they refer to is. If it works when you explicitly save, then I guess it's that. If that still doesn't work, feel free to raise a case about it not playing nice with formatOnSave and I'll do some investigation.

  6. skybrian commented on Oct 11, 2016

    @skybrian

    Yeah, I found that confusing too. I think it refers to when "file.autoSave" is set to "afterDelay", which isn't what I selected.

    It doesn't format when I explicitly save. I tried setting "file.autoSave" to off and it didn't help. (I haven't seen formatting work at all, actually. When should it be working?)

  7. DanTup commented on Oct 12, 2016

    @DanTup
    MemberAuthor

    Alt+Shift+F formats (it's the normal Code shortcut). I expected it'd just get invoked on save now, but haven't had chance to review the 1.6 stuff. It also seems that compiles errors etc will cause forgetting to fail, could it that?

    Could you raise a new case with the details of what does/doesn't work and I'll try to take a look this week?

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions