radian-software / apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
MIT License
518 stars 73 forks source link

Feature request: support https://codeberg.org/ideasman42/emacs-elisp-autofmt #272

Open hab25 opened 6 months ago

hab25 commented 6 months ago

Further, when the user has elisp-autofmt installed, apheleia should probably use it by default for elisp; it is much more powerful than lisp-indent .

raxod502 commented 6 months ago

I'm a bit wary of enabling automatic reformatting for Emacs Lisp by default, as there are not universal style guidelines that everybody agrees on. I might be convinced. In any case, there is nothing wrong with adding a formatter for it, which can be enabled by the user if they want.

hab25 commented 6 months ago

I'm a bit wary of enabling automatic reformatting

Despite the name, elisp-autofmt provides commands to be used non-automatically, and used in this way it still has the significant advantage over lisp-indent in that the former does much more formatting.

raxod502 commented 6 months ago

Right, but if we register the formatter in apheleia-mode-alist by default, then it will indeed become automatic. Like I said I am fine with registering it in apheleia-formatters, though, and letting the user decide if they want it to be run automatically. With the formatter registered, it can always be run manually.