-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement formatting using Language Server Protocol #17918
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
Comments
#18121 was closed in favor of this. Ok, but I'm not sure that moving formatting to LSP will automatically work without quirks inside notebook cells. For example, black works at the file level, some criteria that is sensible at that level isn't at the cell level. I reckon that Jupyter Lab extensions that do black formatting use specific heuristics to deal with these issues. |
Any update on this -- trying to decide if its worth it to file a bug about the existing formatting behaviors ... For example -- it doesn't seem to be possible to force the yapf extension to use one specific yapf implementation for a python mono-repo ... The extension won't expand variables in the path arguments provided to yapf and will always choose the python environment associated with the file as the root path from which to search for python ... This forces you to install yapf in every virtual env within a monorepo -- which is highly undesirable. With below for example: trying to point the extension at the yapf installed in the venv associated with the 'iac' workspace:
|
I am currently working on this for this milestone. |
Black formatter (pre-release) now available here: https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter |
Uh oh!
There was an error while loading. Please reload this page.
Implement following formatters using LSP:
The text was updated successfully, but these errors were encountered: