Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vmiheer/ee9de0a971af3e22520b64442331700f to your computer and use it in GitHub Desktop.
Save vmiheer/ee9de0a971af3e22520b64442331700f to your computer and use it in GitHub Desktop.
Python Black Formatter with Emacs Doom
;; Python Black Formatter
;; package.el
(package! python-black)
;; config.el
(use-package! python-black
:demand t
:after python)
(add-hook! 'python-mode-hook #'python-black-on-save-mode)
;; Feel free to throw your own personal keybindings here
(map! :leader :desc "Blacken Buffer" "m b b" #'python-black-buffer)
(map! :leader :desc "Blacken Region" "m b r" #'python-black-region)
(map! :leader :desc "Blacken Statement" "m b s" #'python-black-statement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment