Skip to content

Commit

Permalink
Improve Emacs configuration (#12070)
Browse files Browse the repository at this point in the history
Replace black and combine `ruff check --select=I --fix` and `ruff
format`.
  • Loading branch information
bersace committed Jun 28, 2024
1 parent 9fec384 commit 2336c07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,11 @@ Ruff is also available as [`emacs-ruff-format`](https://github.com/scop/emacs-ru
Alternatively, it can be used via the [Apheleia](https://github.com/radian-software/apheleia) formatter library, by setting this configuration:

```emacs-lisp
(add-to-list 'apheleia-mode-alist '(python-mode . ruff))
(add-to-list 'apheleia-mode-alist '(python-ts-mode . ruff))
;; Replace default (black) to use ruff for sorting import and formatting.
(setf (alist-get 'python-mode apheleia-mode-alist)
'(ruff-isort ruff))
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
'(ruff-isort ruff))
```

## TextMate (Unofficial)
Expand Down

0 comments on commit 2336c07

Please sign in to comment.