Skip to content

Instantly share code, notes, and snippets.

@btbytes
Created May 17, 2016 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btbytes/41e90ac6c0b07eb6a8a6b42cc761085d to your computer and use it in GitHub Desktop.
Save btbytes/41e90ac6c0b07eb6a8a6b42cc761085d to your computer and use it in GitHub Desktop.
reason installation
=-=- merlin.2.3.1 installed successfully =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
=> merlin installed.
Quick setup for VIM
-------------------
Append this to your .vimrc to add merlin to vim's runtime-path:
let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim"
Also run the following line in vim to index the documentation:
:execute "helptags " . g:opamshare . "/merlin/vim/doc"
Quick setup for EMACS
-------------------
Add opam emacs directory to your load-path by appending this to your .emacs:
;; Add opam emacs directory to the load-path
(setq opam-share (substring (shell-command-to-string "opam config var share 2> /dev/null") 0 -1))
(add-to-list 'load-path (concat opam-share "/emacs/site-lisp"))
;; Load merlin-mode
(require 'merlin)
;; Start merlin on ocaml files
(add-hook 'tuareg-mode-hook 'merlin-mode t)
(add-hook 'caml-mode-hook 'merlin-mode t)
Take a look at https://github.com/the-lambda-church/merlin for more information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment