Switch python formatting to use ruff instead of black+isort

Enable diff-hl on remote buffers
This commit is contained in:
Evie Litherland-Smith 2024-07-29 14:11:57 +01:00
parent c962bb3f93
commit f6d639315d

View file

@ -333,7 +333,7 @@
(add-hook 'magit-pre-refresh-hook #'diff-hl-magit-pre-refresh)
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh)
:custom
(diff-hl-disable-on-remote t)
(diff-hl-disable-on-remote nil)
(diff-hl-draw-borders t)
:config
(global-diff-hl-mode))
@ -941,11 +941,10 @@
:custom (apheleia-remote-algorithm 'cancel)
:config
(add-to-list 'apheleia-formatters '(alejandra . ("alejandra")))
(add-to-list 'apheleia-formatters '(isort . ("isort" "--profile" "black" "-")))
(add-to-list 'apheleia-mode-alist '(nix-mode . alejandra))
(add-to-list 'apheleia-mode-alist '(python-base-mode . (black isort)))
(add-to-list 'apheleia-mode-alist '(python-mode . (black isort)))
(add-to-list 'apheleia-mode-alist '(python-ts-mode . (black isort))))
(add-to-list 'apheleia-mode-alist '(python-base-mode . (ruff ruff-isort)))
(add-to-list 'apheleia-mode-alist '(python-mode . (ruff ruff-isort)))
(add-to-list 'apheleia-mode-alist '(python-ts-mode . (ruff ruff-isort))))
(use-package flymake
:bind (("C-c C-." . flymake-goto-next-error)