-
Notifications
You must be signed in to change notification settings - Fork 84
Changing the formatter for a single project
Daniel Perez Alvarez edited this page Jan 18, 2025
·
1 revision
To change the formatter for a major mode in a single project add a .dir-locals.el
file (or run M-x add-dir-local-variable
). See https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((python-mode . ((apheleia-formatter . ruff)))
(python-ts-mode . ((apheleia-formatter . ruff))))
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((typescript-ts-mode . ((apheleia-formatter . denofmt)
(lsp-enabled-clients . 'deno-ls))))
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((json-ts-mode . ((apheleia-formatter . biome)))
(js-ts-mode . ((apheleia-formatter . biome)))
(tsx-ts-mode . ((apheleia-formatter . biome)))
(typescript-ts-mode . ((apheleia-formatter . biome))))