-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feature request: Add code formatting button in toolbar for .py files #252
Comments
Hello! Sorry for the late reply. Of course, will try to do this in the coming days. Though I really recommend configuring keyboard shortcuts instead of clicking a button. |
@ryantam626 Could you tell us how to bind a keyboard shortcut to format regular textfiles? The example settings don't work outside of notebooks. I assume that a certain selector must be set, but I can't find any documentation about those. |
should work. I am not sure why P.S.: Just in case you are not familiar with what "selector" means and web dev - "selector" here is CSS selector, and you can find how to target specific element inside jupyterlab with any devtools of mordern browser (e.g. Chrome DevTools), the button on the top left of Chrome DevTools is particularly useful. And also |
@ryantam626 Thanks for your helpful reply. I'll run with the black formatter only for now. Also, I've tried concatenating the isort and black commands manually (instead of using format) as described in the docs, but only isort is ever executed. May I kindly ask you to tell me if I've made a mistake? Or is this behavior part of the problem that causes format to not function as intended?
|
Hi Ryan, I was wondering if you had time to look into this? |
Hello, and thank you for creating this extension.
When opening a python file (*.py), the toolbar doesn't contain the 'code format' button.
It is possible to use the command palette to format but it's not very convenient.
It would be good to add this button for .py files, or having a config option to enable it.
The text was updated successfully, but these errors were encountered: