blacken
blacken copied to clipboard
Python Black for Emacs
I'm working on a project that has this in the `pyproject.toml`: ```toml [tool.black] line-length = 100 ``` `black` says that nothing needs to be reformatted: ``` $ black --check ....
I set the black package so it blacks on save: (add-hook 'python-mode-hook 'blacken-mode) That worked fine for about a day, and then my emacs refused to open new files or...
Idea is: reflow the code when the window is resized. - When emacs open a file blacken could pass black with --line-length equal to the number of column of the...
# My Environment - OS: MX Linux 18 - Result of `$ uname -r`: 4.19.0-5-amd64 - [dotfiles](https://github.com/mrbig033/dotfiles) - i3 version 4.13 - [~/.config/i3](https://github.com/mrbig033/dotfiles/blob/master/i3/config) - GNU Emacs 27.0.50 - [~/.emacs.d](https://github.com/mrbig033/emacs) -...
I often like to see where `black` changed my file, in order to not make the same mistakes over and over. A function like `blacken-buffer-diff` showing the diff output in...
Replacing the entire buffer with `copy-to-buffer` is disruptive: It's a delete followed by a replace, and many links within emacs (including compilation, grep, and occur buffers) will overreact to the...
There doesn't seem to be any support for [blackd](https://black.readthedocs.io/en/stable/blackd.html), it would be nice if this package built in support with it so frequent formatting of large files gets faster.
## My Environment - **OS**: MX Linux 18 - **$ uname -r**: 4.19.0-5-amd64 - [dotfiles](https://github.com/mrbig033/dotfiles) - **i3wm** version 4.13 - [~/.config/i3](https://github.com/mrbig033/dotfiles/blob/master/i3/config) - **GNU Emacs** 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version...
Similar to #16, I'm seeing screen paint/redisplay errors. E.g. starting with ``` [ 1, 2, 3 ] ``` With point at the end of the buffer, on saving, the screen...
When working with existing code, it is useful to only re-format a certain region of a file. It would be great if blacken could support re-formatting only the highlighted region...