Skip to content

Formatting while typing #593

@jamiebuilds

Description

@jamiebuilds

This is gonna be a fun issue...

So a lot of editors try to do code formatting while you are typing, and to varying degrees they all kinda suck at it.

While it's an okay experience to format on save or after the fact, it would be nice if things were auto-formatting while typing.

There's a couple messages in the language-server-protocol for "formatting requests":

Each of this represents a different opportunity for prettier to fix the formatting of code.

One of the important pieces here will be that it will be possible to have an invalid program which Babylon will currently reject because the user hasn't finished making it valid. Will have to talk to Babylon folks about implementing a "loose" parser which can recover from mistakes (cc @hzoo @danez).

While the language-server-protocol doesn't work everywhere. If more tools like prettier embraced it, it would push more editors to formally implement it, which would be a nice effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:needs discussionIssues needing discussion and a decision to be made before action can be taken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions