Improve ocaml language support
See README.org. Signed-off-by: Edwin Török <edwin@etorok.net>
This commit is contained in:
parent
476782e6d4
commit
064579e33e
4 changed files with 198 additions and 6 deletions
|
@ -1,5 +1,30 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/ocaml/packages.el
|
||||
|
||||
(when (featurep! +opam-site-lisp)
|
||||
(defvar +ocaml-elisp-dir
|
||||
(when (executable-find "opam")
|
||||
(let ((opam-share (ignore-errors (car (process-lines "opam" "config" "var" "share" "--safe")))))
|
||||
(when (and opam-share (file-directory-p opam-share))
|
||||
(expand-file-name "emacs/site-lisp" opam-share)))))
|
||||
|
||||
(defmacro localpackage! (name)
|
||||
`(package! ,name :recipe (:fetcher file :path ,+ocaml-elisp-dir)))
|
||||
|
||||
(localpackage! opam-site-lisp))
|
||||
|
||||
(package! tuareg)
|
||||
(package! merlin)
|
||||
|
||||
(when (featurep! :feature syntax-checker)
|
||||
(package! flycheck-ocaml))
|
||||
|
||||
(unless (featurep! +opam-site-lisp)
|
||||
(package! merlin)
|
||||
(package! ocp-indent)
|
||||
(when (featurep! :feature eval)
|
||||
(package! utop))
|
||||
(when (featurep! :editor format)
|
||||
;; by default quelpa generated a version 0pre0.20180929.192844, which got parsed into (0 -1 0 ...), which when compared with version nil (0)
|
||||
;; in package-installed-p always yielded false
|
||||
(package! ocamlformat :recipe (:fetcher github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el"))))
|
||||
(package! dune :recipe (:fetcher github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el"))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue