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

Current status of Merlin on Windows #1170

Closed
johnwhitington opened this issue Sep 8, 2020 · 3 comments
Closed

Current status of Merlin on Windows #1170

johnwhitington opened this issue Sep 8, 2020 · 3 comments

Comments

@johnwhitington
Copy link

I'm working on new content for ocaml.org, on "Getting up and Running with OCaml", which includes editor support. One of our priorities is to make sure that Windows install instructions are treated equally, up to date and correct.

I have successfully got the ocaml-lsp working with Visual Studio Code under Windows, so we have at a least one working system to point Windows users to. However, I have been unable to get merlin + vim working with the recommended OCaml windows distribution:

https://fdopen.github.io/opam-repository-mingw/

(I can install merlin, and run the server, but getting vim to locate it, following the instructions merlin prints upon being installed is failing - I have no problem on OS X or linux).

Before I spend more time on trying to get this combination working so I can recommend it on ocaml.org, can someone confirm that it is currently supposed to work? And also for emacs? Are any of the developers using merlin on Windows? I see that some other issues (#754, #721, #599) are open with regard to Windows support.

Thanks for any pointers you can supply.

@nojb
Copy link
Contributor

nojb commented Sep 8, 2020

Before I spend more time on trying to get this combination working so I can recommend it on ocaml.org, can someone confirm that it is currently supposed to work? And also for emacs? Are any of the developers using merlin on Windows? I see that some other issues (#754, #721, #599) are open with regard to Windows support.

Just as a datapoint, at LexiFi we use merlin

  • under Windows,
  • with emacs
  • without opam
  • compiled with dune using msvc compiler
  • with the following incantation in our .emacs file (merlin is assumed to be in the PATH):
(when (setq merlin-command (executable-find "ocamlmerlin"))
  (let ((dir (file-name-directory merlin-command)))
    (add-to-list 'load-path (concat dir "emacs/site-lisp"))
    (autoload 'merlin-mode "merlin" nil t nil)
    (add-hook 'caml-mode-hook 'merlin-mode t)))

Cheers,
Nicolás

@trefis
Copy link
Contributor

trefis commented Sep 22, 2020

It seems that merlin itself (the binary) is working fine on windows, as you've noticed yourself (lsp is based on merlin) and as reported by @nojb.

As for how the editor setup and PATH management on windows is supposed to work… I won't be able to help you, and I don't expect @let-def will either.
So I think this issue can probably be closed.

I do wish you luck.

@johnwhitington
Copy link
Author

Thanks everyone!

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

No branches or pull requests

3 participants