Closed sangwoo-joh closed 1 year ago
Thanks for the PR! as a vim user, i'll ping @AltGr for this one
I wonder whether this should consider also setting (add-hook 'before-save-hook 'ocamlformat-before-save)
?
I'm also not sure if there is a standard key binding that most use. For one data point, I shadow the keys tuareg-indent-phrase
to invoke ocamlformat, so M-q
and C-c C-q
.
It is also not completely obvious in which mode map to put these bindings. Is it ok to hijack tuareg-mode-map
with not-so-related bindings?
@jberdine Thanks for your comment.
Regarding (add-hook 'before-save-hook 'ocamlformat-before-save)
, I think it should also consider the setting.
Regarding key bindings, I'm also not sure if there is a dominant key biding standard. I'm wondering if there is a way to get a key binding from user input.
Regarding hijacking, I just added it to tuareg-mode-map
because it was the way I've used for a long time. If there is a better way to do this, please let me know.
Thank you.
@rjbou @AltGr This PR seems reasonable to me. What does it need to get merged? Is it waiting on adding support to ocamlformat
to the other editors as well?
I have some time in the next couple of days, if there's any thing I can do to help. :)
Oh I am sorry this completely passed under my radar. Thanks for the contribution, and this seems good to me!
Hi.
I've added some implementations to integrate
ocamlformat
into Emacs setup (#40) I only added this to Emacs setup just because my primary editor is Emacs. It bindsC-c C-f
to callocamlformat
for the current buffer.Please review this pull request. Thank you.