|
| 1 | +opam-version: "2.0" |
| 2 | + |
| 3 | +authors: "The Merlin team" |
| 4 | +homepage: "https://github.com/ocaml/merlin" |
| 5 | +bug-reports: "https://github.com/ocaml/merlin/issues" |
| 6 | +dev-repo: "git+https://github.com/ocaml/merlin.git" |
| 7 | +license: "MIT" |
| 8 | +x-maintenance-intent: ["(latest)"] |
| 9 | +build: [ |
| 10 | + ["dune" "subst"] {dev} |
| 11 | + ["dune" "build" "-p" name "-j" jobs] |
| 12 | + ["dune" "runtest" "-p" name "-j" jobs] {with-test} |
| 13 | +] |
| 14 | +depends: [ |
| 15 | + "dune" {>= "3.0.0"} |
| 16 | + "merlin-lib" {= version} |
| 17 | + "dot-merlin-reader" {= version} |
| 18 | + "ocaml-index" {>= "1.0" & post} |
| 19 | + "yojson" {>= "2.0.0"} |
| 20 | + "conf-jq" {with-test} |
| 21 | + "ppxlib" {with-test} |
| 22 | +] |
| 23 | +conflicts: [ |
| 24 | + "seq" {!= "base"} |
| 25 | +] |
| 26 | +synopsis: |
| 27 | + "Editor helper, provides completion, typing and source browsing in Vim and Emacs" |
| 28 | +description: |
| 29 | + "Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more." |
| 30 | +post-messages: [ |
| 31 | + "merlin installed. |
| 32 | + |
| 33 | +Quick setup for VIM |
| 34 | +------------------- |
| 35 | +Append this to your .vimrc to add merlin to vim's runtime-path: |
| 36 | + let g:opamshare = substitute(system('opam var share'),'\\n$','','''') |
| 37 | + execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" |
| 38 | + |
| 39 | +Also run the following line in vim to index the documentation: |
| 40 | + :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" |
| 41 | + |
| 42 | +Quick setup for EMACS |
| 43 | +------------------- |
| 44 | +Add opam emacs directory to your load-path by appending this to your .emacs: |
| 45 | + (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"var\" \"share\"))))) |
| 46 | + (when (and opam-share (file-directory-p opam-share)) |
| 47 | + ;; Register Merlin |
| 48 | + (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) |
| 49 | + (autoload 'merlin-mode \"merlin\" nil t nil) |
| 50 | + ;; Automatically start it in OCaml buffers |
| 51 | + (add-hook 'tuareg-mode-hook 'merlin-mode t) |
| 52 | + (add-hook 'caml-mode-hook 'merlin-mode t) |
| 53 | + ;; Use opam switch to lookup ocamlmerlin binary |
| 54 | + (setq merlin-command 'opam) |
| 55 | + ;; To easily change opam switches within a given Emacs session, you can |
| 56 | + ;; install the minor mode https://github.com/ProofGeneral/opam-switch-mode |
| 57 | + ;; and use one of its \"OPSW\" menus. |
| 58 | + )) |
| 59 | +Take a look at https://github.com/ocaml/merlin for more information |
| 60 | + |
| 61 | +Quick setup with opam-user-setup |
| 62 | +-------------------------------- |
| 63 | + |
| 64 | +Opam-user-setup support Merlin. |
| 65 | + |
| 66 | + $ opam user-setup install |
| 67 | + |
| 68 | +should take care of basic setup. |
| 69 | +See https://github.com/OCamlPro/opam-user-setup |
| 70 | +" |
| 71 | + {success & !user-setup:installed} |
| 72 | +] |
| 73 | +url { |
| 74 | + src: |
| 75 | + "https://github.com/ocaml/merlin/releases/download/v5.5-503/merlin-5.5-503.tbz" |
| 76 | + checksum: [ |
| 77 | + "sha256=67da3b34f2fea07678267309f61da4a2c6f08298de0dc59655b8d30fd8269af1" |
| 78 | + "sha512=1fb3b5180d36aa82b82a319e15b743b802b6888f0dc67645baafdb4e18dfc23a7b90064ec9bc42f7424061cf8cde7f8839178d8a8537bf4596759f3ff4891873" |
| 79 | + ] |
| 80 | +} |
| 81 | +x-commit-hash: "8b88b89ee7431a23eaf95e4e02e45dc65595aa74" |
0 commit comments