radian-software / apheleia

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

Update `apheleia-indent-lisp-buffer` to respect local variables #286

Closed tpeacock19 closed 7 months ago

tpeacock19 commented 7 months ago

I ran into some issues using apheleia while contributing to a project that works with indent-tabs-mode disabled. This led to this slight modification of apheleia-indent-lisp-buffer

This allows for any local values for indent-line-function, lisp-indent-function to be carried over when formatting. Additionally, added indent-tabs-mode in order to prevent adding tabs when unwanted.

If there is any additional documentation you would like me to provide, let me know and I can update.

raxod502 commented 7 months ago

Yeah, that makes sense. We should be enabling the major mode before setting the local variables. I think this just needs a changelog entry, no need to update the README as the new behavior is what a user would intuitively expect to happen.

tpeacock19 commented 7 months ago

I put it under bugs fixed if that works