Automatically remove unused imports when saving Python files
This commit is contained in:
parent
09089eb9d7
commit
4929a564c6
1 changed files with 8 additions and 0 deletions
|
|
@ -197,6 +197,14 @@
|
|||
:config
|
||||
(apheleia-global-mode)
|
||||
(setf (alist-get 'emacs-lisp-mode apheleia-mode-alist nil 'remove) nil)
|
||||
(setf (alist-get 'ruff-isort apheleia-formatters)
|
||||
'("ruff" "check"
|
||||
"-n"
|
||||
"--select" "I"
|
||||
"--select" "F401"
|
||||
"--fix" "--fix-only"
|
||||
"--stdin-filename" filepath
|
||||
"-"))
|
||||
(setf (alist-get 'python-mode apheleia-mode-alist)
|
||||
'(ruff-isort ruff))
|
||||
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue