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

Allow setting the tmp file location for black formatting #17907

Closed
jadami10 opened this issue Nov 2, 2021 · 3 comments
Closed

Allow setting the tmp file location for black formatting #17907

jadami10 opened this issue Nov 2, 2021 · 3 comments
Assignees
Labels
area-formatting feature-request Request for new features or functionality

Comments

@jadami10
Copy link

jadami10 commented Nov 2, 2021

VSCode first copies the file to reformat into a temporary .py..tmp file, then calls Black on that file, and brings the changes in the modified files back into the editor. This happens in the same location as the existing file.

We have processes that are notified of file creation, deletion, and changes; so this is causing some churn as it's catching the creation and deletion of the tmp file. Would it be possible to add an option to change the location of these tmp files to somewhere like /tmp? Or not even use a tmp file if it's not strictly necessary.

@jadami10 jadami10 added triage-needed Needs assignment to the proper sub-team feature-request Request for new features or functionality labels Nov 2, 2021
@karthiknadig
Copy link
Member

There is better solution. We plan on putting formatting behind Language Server protocol. A benefit of that is we won't need temp files to perform formatting.

@jadami10
Copy link
Author

jadami10 commented Nov 2, 2021

Is there a separate issue I can track for that work?

@karthiknadig karthiknadig self-assigned this Nov 3, 2021
@karthiknadig karthiknadig added area-formatting triage and removed triage-needed Needs assignment to the proper sub-team labels Nov 3, 2021
@karthiknadig
Copy link
Member

@jadami10 Currently we are working on getting linters over LSP #17235. I just created this meta issue to track the transition of formatters to LSP #17918.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants