ocaml / dune

A composable build system for OCaml.
https://dune.build/
MIT License
1.59k stars 395 forks source link

Provide instructions on getting emacs dune-mode installed #2184

Open shonfeder opened 5 years ago

shonfeder commented 5 years ago

I ended up having to manually load the file from the install location in my ~/.opam directory. There is probably a better way to get the package available, but I couldn't find any trace of it.

If someone notes the preferred installation method, I'm happy to test it and write up the documentation.

ghost commented 5 years ago

/cc @Chris00

I'm not an expert in this domain, but I believe a few options are:

fdagnat commented 4 years ago

Hello, No progress on this? For the record, on my side I ended up adding the following lines to my .emacs:

(load "/path/to/the/right/opam/switch/share/emacs/site-lisp/dune.el")
(add-to-list 'auto-mode-alist '("/dune\\'" . dune-mode))
sanette commented 3 years ago

M-x package-refresh-contents M-x package-install -> type dune, enter

ejgallego commented 3 years ago

Not sure how to solve this, indeed maybe adding a bit of documentation?

fdagnat commented 3 years ago

I find the approach of https://github.com/ocaml-opam/opam-user-setup interesting

pveber commented 6 months ago

After years of using dune (not to mention emacs!), I've just discovered there's a dune-mode, so I think this very useful bit of code deserves more advertising. How about adding a section in the (otherwise excellent) documentation about editor support, showing how to install dune-mode (I followed @sanette's suggestion) and how to activate it automatically when editing dune files (opam-user-setup did it for me).