@glennsl I Just assumed they had to be installed via opam… Someone within the great circle of OCaml knowledge should create a link where the rookies can go to see(in simple, straight forward steps) how Emacs, Vim, VS Code are set up for OCaml development.
If you’re using Emacs, I think you’re pretty much expected to have made the significant investment of comprehending the entire manual, and therefore be able to set it up by just reading the tuareg-mode README. Also, because Emacs is so configurable, it’s hard to give exact instructions that will work with everyone’s configuration. For example, I use Doom Emacs, where setting up OCaml is as simple as uncommenting a single line of configuration. But if it wasn’t, I’d have to translate the instructions to work with the Doom Emacs configuration framework. Which is fairly trivial, but still not something that can just be copied and pasted from a guide.
The only official looking instructions I could find suggest using opam to install tuareg and merlin: Real World OCaml. Merlin in particular is opam switch specific, so that’s not so strange. That said, actually using emacs and merlin with more than one opam switch is a huge pain.
VS code setup is dead simple in comparison, so it’s good to see that’s where new users are being pointed.
Just to add a second opinion, I usually install tuareg via opam rather than melpa, because it makes it easier to install all my editor plugins (i.e with merlin etc.) in one place - and it works out-of-the-box for me (debian), although I install emacs through apt.
Echoing @dbuenzli , the issue seems to be that when building conf-emacs, emacs isn’t in the PATH.
I think the issue might probably be related to the snap store not configuring your shell PATH correctly?
I’m not a hundred percent sure which files are loaded when setting up the env, but could it be that Emacs is added to your PATH in the initialisation scripts for your shell particular shell (i.e .zshrc if you’re using zsh), and not added to your path for whatever shell opam uses? Not sure if this is the cause of the problem, but it would be the first thing I would look into if I ran into this problem myself.
I hate snap store, and flatpak, as they happen to have problems installing software properly, in my opinion. Usually better to use backport repository in Debian.