-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comment indentation problems #145
Comments
I experimented the same thing but just inside a function that do a match over a variant. |
Yes. When there is no subsequent expression, the comment is reputed to belong to the previous expression. I'll see what I can do about that. (For now, I also tend to use the |
thanks @Chris00 |
Hi @yogin25 @robgev,
|
Actually I just realized that (add-hook 'tuareg-mode-hook (lambda ()
(local-set-key (kbd "<C-return>") #'electric-indent-just-newline))) EDIT: on second thought it seems more natural to bind (add-hook 'tuareg-mode-hook (lambda () (company-mode)
(local-set-key (kbd "<S-return>") #'electric-indent-just-newline)
(local-set-key (kbd "<C-return>") #'company-complete))) |
thank's for the hint |
@yogin25 FYI here is the corresponding doc:
|
Hello,
I am new trying to learn OCaml. While doing exercises from a book, I try to put comments for later reference. However, comment style/automatic indentation acts strangely. If you put
;;
at the end of the line it works fine, goes to the start of the new line where you can put comments normally. However, if you do not put them it indents comments as it's code.Note: in case if you write some code line and hit enter it transfers it to the start of the line, but in case of comments it acts the opposite way.
I've tried both opam and melpa versions of tuareg.
P.S. Here is a simple GIF showing what's the problem.
The text was updated successfully, but these errors were encountered: