Skip to content

Commit

Permalink
Add instructions for configuration of Emacs
Browse files Browse the repository at this point in the history
Add editor integration docs for `ruff format` in Emacs by way of the Apheleia formatter library

Depends on:  radian-software/apheleia#233
  • Loading branch information
offbyone committed Nov 5, 2023
1 parent 75c9be0 commit eec5059
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ Ruff is available as [`flymake-ruff`](https://melpa.org/#/flymake-ruff) on MELPA
(add-hook 'python-mode-hook #'flymake-ruff-load)
```

Ruff can be used as a formatter in Emacs using 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))
```

## TextMate (Unofficial)

Ruff is also available via the [`textmate2-ruff-linter`](https://github.com/vigo/textmate2-ruff-linter)
Expand Down

0 comments on commit eec5059

Please sign in to comment.