Skip to content
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

Remove editor.formatOnType support #1586

Closed
brettcannon opened this issue May 3, 2018 · 5 comments
Closed

Remove editor.formatOnType support #1586

brettcannon opened this issue May 3, 2018 · 5 comments
Labels
area-formatting debt Covers everything internal: CI, testing, refactoring of the codebase, etc.
Milestone

Comments

@brettcannon
Copy link
Member

brettcannon commented May 3, 2018

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).

@brettcannon brettcannon added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. area-formatting needs decision labels May 3, 2018
@brettcannon brettcannon added this to the May 2018 milestone May 3, 2018
@DonJayamanne
Copy link

in TypeScript is just not worth the constant maintenance

Agreed, considering this will be thrown away.

@brettcannon brettcannon changed the title Decide if we want to keep trying to support editor.formatOnType Remove editor.formatOnType support May 7, 2018
@MikhailArkhipov
Copy link

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.

@brettcannon
Copy link
Member Author

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.

@brettcannon
Copy link
Member Author

We are re-evaluating this decision later today.

@brettcannon
Copy link
Member Author

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting debt Covers everything internal: CI, testing, refactoring of the codebase, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants