Skip to content
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

Indentation broken? #262

Open
hovsater opened this issue Aug 13, 2021 · 4 comments
Open

Indentation broken? #262

hovsater opened this issue Aug 13, 2021 · 4 comments

Comments

@hovsater
Copy link

I wanted to try out tuareg for OCaml development, but I'm having a hard time getting the indentation to work properly. Here's the relevant excerpt from my init.el:

;; Enable Tuareg (Emacs OCaml mode).
;; See https://github.com/ocaml/tuareg
(use-package tuareg
  :defer t
  :config
  (use-package merlin
    :hook (tuareg-mode . merlin-mode)))

As you can see from the video below, the indentation is completely haywire.

Screen.Recording.2021-08-13.at.13.39.15.mov
@Fourchaux
Copy link

Only the indentation of the comments is wrong.
You can try ocp-indent.

  (use-package ocp-indent
    :hook (tuareg-mode-hook . ocp-setup-indent))

@hovsater
Copy link
Author

hovsater commented Aug 13, 2021

@Fourchaux you're right. Sorry if I came across as overly negative. I'm extremely thankful for all work put into this package.🙂

Didn't know about ocp-indent. Is it compatible with Tuareg?

@mattiase
Copy link
Contributor

This looks like issue #179 again.
Note that tuareg knows how to indent the comments once you've written a non-comment on a later line. Try indenting the comments again. (Not to excuse the behaviour, of course.)

@hovsater
Copy link
Author

@mattiase indeed. Pressing M-q after typing out the next line, moves the comments in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants