Open seanirby opened 8 years ago
Thanks. I will look into it soon.
Same here. It doesn't appear to handle property lists well.
(use-package srefactor
:straight t
:config (require 'srefactor-lisp)(defun format-emacs-lisp-buffer ()
(when (and (eq major-mode 'emacs-lisp-mode)
(not (s-equals? ".emacs"
(buffer-name))))
(srefactor-lisp-format-buffer)))(add-hook 'before-save-hook #'format-emacs-lisp-buffer)(advice-add 'org-edit-src-save :before #'format-emacs-lisp-buffer))
At minimum it should not glue together multiline expressions without line breaks between them.
If I change my style and use progn
it's okay, but this should not be required.
(use-package srefactor
:straight t
:config (progn
(require 'srefactor-lisp)
(defun format-emacs-lisp-buffer ()
(when (and (eq major-mode 'emacs-lisp-mode)
(not (s-equals? ".emacs"
(buffer-name))))
(srefactor-lisp-format-buffer)))
(add-hook 'before-save-hook #'format-emacs-lisp-buffer)
(advice-add 'org-edit-src-save :before #'format-emacs-lisp-buffer)))
If I change my style and use progn it's okay, but this should not be required.
Tried out your snippet and now I have lines over 200 characters long due to my extensive use of use-package
configs.
A long shot after almost five years, but... did anybody find a workaround?
@bard I just stopped using srefactor
.
Hey @tuhdo
Thanks for this package.
I'm generating some lisp code programmatically and I need to format it with your tool after I insert it into a buffer. Works great except for this little bug. Not a big deal for me at all, just thought I would let you know:
starting input
expected output
actual output after executing
srefactor-lisp-format-sexp
at beginning of buffer