From 3575a09192cfb23926bc26eb1bcc88432bd63c69 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 21 Dec 2023 09:43:35 +0000 Subject: [PATCH] Add ruff as preferred python formatter Move apheleia into own section of config --- README.org | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index 57bd222..94fbdbf 100644 --- a/README.org +++ b/README.org @@ -686,13 +686,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]] :ensure t :hook (prog-mode)) - (use-package apheleia - :ensure t - :defer nil - :bind (("C-c c f" . apheleia-format-buffer)) - :custom (apheleia-remote-algorithm 'local) - :config (apheleia-global-mode +1)) - (use-package treesit-auto :config (global-treesit-auto-mode +1)) @@ -743,6 +736,18 @@ For reference information, see [[https://orgmode.com][Org-mode website]] :features "all")))))) #+END_SRC +** Apheleia formatting +#+begin_src emacs-lisp + (use-package apheleia + :ensure t + :defer nil + :bind (("C-c c f" . apheleia-format-buffer)) + :custom (apheleia-remote-algorithm 'local) + :config + (add-to-list 'apheleia-mode-alist '(python-ts-mode . ruff)) + (add-to-list 'apheleia-mode-alist '(python-mode . ruff)) + (apheleia-global-mode +1)) +#+end_src ** Flymake #+begin_src emacs-lisp :tangle yes (use-package flymake