mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:14:52 +00:00
Add instructions for configuration of Emacs (#8488)
## Summary Add editor integration docs for `ruff format` in Emacs by way of the Apheleia formatter library Depends on: https://github.com/radian-software/apheleia/issues/233
This commit is contained in:
parent
1672a3d3b7
commit
72ebde8d38
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue