update emacs integration section to include emacs-ruff-format (#9403)

## Summary

For emacs users just seeking a ruff formatter, apheleia is overkill.
Instead, a melpa package
[emacs-ruff-format](https://github.com/scop/emacs-ruff-format) exists
now.
This change prepends a mention of this package, without removing
apheleia as an alternative.

## Test Plan

This is how I integrated ruff into my emacs.
This commit is contained in:
port19 2024-01-14 03:55:51 +01:00 committed by GitHub
parent e8d7a6dfce
commit b6ce4f5f3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -334,7 +334,14 @@ 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:
Ruff is also available as [`emacs-ruff-format`](https://github.com/scop/emacs-ruff-format):
```elisp
(require 'ruff-format)
(add-hook 'python-mode-hook 'ruff-format-on-save-mode)
```
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))