Add ruff as preferred python formatter

Move apheleia into own section of config
This commit is contained in:
Evie Litherland-Smith 2023-12-21 09:43:35 +00:00
parent ad058643bf
commit 3575a09192

View file

@ -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