Skip to content

Remove editor.formatOnType support #1586

Closed

Description

We keep coming across bugs with the editor.formatOnType setting due to not implementing it in Python itself. I think we need to take a hard look at whether the complexity if trying to make this work in TypeScript is just not worth the constant maintenance overhead. Otherwise we need to look at doing a language server in Python to make this work appropriately (if it's still worth it).

Activity

  1. DonJayamanne commented on May 3, 2018

    @DonJayamanne

    in TypeScript is just not worth the constant maintenance

    Agreed, considering this will be thrown away.

  2. changed the title [-]Decide if we want to keep trying to support editor.formatOnType[/-] [+]Remove editor.formatOnType support[/+] on May 7, 2018
  3. MikhailArkhipov commented on May 22, 2018

    @MikhailArkhipov

    Why would it be better in Python? ASTs cannot be used fully anyway b/c of performance impact - can't wait for parsing on enter. There is always partial parsing involved - with recovery since constructs may not be fully completed. Hence on type formatters typically have heuristics involved. It is not actually possible to have two vs code language servers unless you mean some custom out-of-proc execution like Jedi.

    AFAICS there were 5 bugs filed over 3 months or so.

  4. brettcannon commented on May 23, 2018

    @brettcannon
    MemberAuthor

    The key point is getting this right is hard, and all of this work is for a feature that doesn't seem to have ended up being critical to users based on the fact our team is finding the bugs and not the general public while affecting standard Python features (e.g. *args, relative imports, etc.). IOW I would rather free up your time for more important, impactful things rather than being forced to play whack-a-mole with the heuristics to try and get this right for all scenarios.

  5. brettcannon commented on May 29, 2018

    @brettcannon
    MemberAuthor

    We are re-evaluating this decision later today.

  6. brettcannon commented on May 30, 2018

    @brettcannon
    MemberAuthor

    We pushed the feature hard and ferreted out a bunch of bugs which are already mostly fixed, so we are going to keep the feature in place.

  7. locked as resolved and limited conversation to collaborators on Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions