Open joneshf opened 5 years ago
Hi, any news on this? It would be really nice if purty integrated with purescript-mode already, even if it wouldn't have all the features wanted yet.
One of the worst things to me as beginner when writing purescript occurs when I need to edit jsx style nodes (react-basic for example). When I need to wrap some long snippet with another div
, moving everything correctly again by hand is very tedious). purty
in those cases makes such a difference.
At the moment I use:
(use-package purescript-mode
:ensure t
:config
(defun format-ps ()
(interactive)
(set-process-sentinel
(start-process "auto-format-purescript"
(current-buffer)
"purty"
"--write"
buffer-file-name)
(lambda (process event)
(revert-buffer :ignore-auto :noconfirm))))
:bind ("C-c C-f" . format-ps)
:mode ("\\.purs$" . purescript-mode))
Can you just use https://github.com/lassik/emacs-format-all-the-code? According to the README it knows how to invoke purty
on PureScript code.
Can you just use https://github.com/lassik/emacs-format-all-the-code? According to the README it knows how to invoke
purty
on PureScript code.
😅 Oh nice, I didn't know this package. Thanks
Howdy!
I maintain a source code formatter:
purty
. I'd like to add support for using it from emacs.Is this something that could be added to
purescript-mode
? If so, I'd like the burden on you to be as minimal as possible, so when the API ofpurty
changes, I expect to update whatever's necessary to work here. Would it be easier if I maintained apurty-mode
andpurescript-mode
depended on it somehow (I don't know enough about the emacs ecosystem). If it shouldn't be added topurescript-mode
, no worries.