Replace format-all with apheleia

This commit is contained in:
Dimitri Lozeve 2023-12-23 22:58:26 +01:00
parent d237888aa4
commit 7f4888677e

15
init.el
View file

@ -195,7 +195,7 @@
:straight t
:bind
(("C-;" . embark-act) ;; pick some comfortable binding
;("M-;" . embark-dwim)
;;("M-;" . embark-dwim)
("C-h B" . embark-bindings)) ;; alternative for `describe-bindings'
:init
;; Optionally replace the key help with a completing-read interface
@ -391,9 +391,7 @@
:after (org)
:config
(setq org-mime-export-options
'(:section-numbers nil
:with-author nil
:with-toc nil))
'(:section-numbers nil :with-author nil :with-toc nil))
(setq org-mime-export-ascii 'utf-8)
(add-hook 'org-mime-html-hook
(lambda ()
@ -652,9 +650,14 @@
:config
(add-hook 'eglot-managed-mode-hook #'eldoc-box-hover-mode t))
(use-package format-all
(use-package apheleia
:straight t
:bind ("C-c C-f" . format-all-buffer))
:config
(apheleia-global-mode +1)
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
'(ruff))
(setf (alist-get 'python-mode apheleia-mode-alist)
'(ruff)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Programming languages modes