OCAML настроен в emacs - автозаполнение на точке - PullRequest
0 голосов
/ 07 июня 2018

OSX 10.13.4 / Emacs 25.3 (9) / Уровень OCaml, версия 4.06.1.

Новичок в OCAML и в Emacs и пытается понять, как сделать автозаполнение в точке.Мой init.el выглядит так:

;;---------------------------------------
;; OCAML MODE CONFIGURATION
;; --------------------------------------
> (add-hook 'tuareg-mode-hook 'tuareg-imenu-set-imenu) (setq
> auto-mode-alist
>       (append '(("\\.ml[ily]?$" . tuareg-mode)
>                 ("\\.topml$" . tuareg-mode))
>               auto-mode-alist)) (autoload 'utop-setup-ocaml-buffer "utop" "Toplevel for OCaml" t) (add-hook 'tuareg-mode-hook
> 'utop-minor-mode) (add-hook 'tuareg-mode-hook 'merlin-mode) (setq
> merlin-use-auto-complete-mode t) (setq merlin-error-after-save nil)

По какой-то причине завершение в точке говорит: применить: Поиск программы: нет такого файла или каталога, /Users/xxxx/.opam/system/bin/ocamlmerlin

Я немного растерялся с этим OPAM ...

opam switch system дает мне:

# To setup the new switch in the current shell, you need to run:
eval `opam config env`

и opam list дает мне:

 # Installed packages for system:
    base-bigarray        base  Bigarray library distributed with the OCaml compiler
    base-bytes           base  Bytes library distributed with the OCaml compiler
    base-threads         base  Threads library distributed with the OCaml compiler
    base-unix            base  Unix library distributed with the OCaml compiler
    conf-m4                 1  Virtual package relying on m4
    conf-which              1  Virtual package relying on which
    jbuilder       1.0+beta20  Fast, portable and opinionated build system
    ocamlfind           1.8.0  A library manager for OCaml

Thanks to @Lhooq: install merlin работает!

# Installed packages for system:
base-bigarray        base  Bigarray library distributed with the OCaml compiler
base-bytes           base  Bytes library distributed with the OCaml compiler
base-threads         base  Threads library distributed with the OCaml compiler
base-unix            base  Unix library distributed with the OCaml compiler
biniou              1.2.0  Binary data format designed for speed, safety, ease o
conf-m4                 1  Virtual package relying on m4
conf-which              1  Virtual package relying on which
cppo                1.6.4  Equivalent of the C preprocessor for OCaml programs
easy-format         1.3.1  High-level and functional interface to the Format mod
jbuilder       1.0+beta20  Fast, portable and opinionated build system
merlin              3.0.5  Editor helper, provides completion, typing and source
ocamlfind           1.8.0  A library manager for OCaml
yojson              1.4.1  Yojson is an optimized parsing and printing library f
...