Skip to content

Commit

Permalink
Some love for OCaml editing
Browse files Browse the repository at this point in the history
  • Loading branch information
superbobry committed Oct 15, 2014
1 parent c95d380 commit 21c8790
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
4 changes: 4 additions & 0 deletions rc/rc-editor.el
Expand Up @@ -266,4 +266,8 @@
:bind ("C-=" . er/expand-region))


(when (functionp 'global-prettify-symbols-mode)
(global-prettify-symbols-mode 1))


;;; rc-editor.el ends here
38 changes: 16 additions & 22 deletions rc/rc-languages.el
Expand Up @@ -93,7 +93,7 @@
hi2-left-offset 4
hi2-ifte-offset 4)

;; (haskell-indent-mode -1)
(haskell-indent-mode -1)
(hi2-mode)))))

(use-package ghci-completion
Expand All @@ -103,27 +103,21 @@

;; OCaml

(when (executable-find "opam")
(add-to-list 'load-path
(concat
(replace-regexp-in-string
"\n$" ""
(shell-command-to-string "opam config var share"))
"/emacs/site-lisp"))

(let* ((opam-prefix
(substring (shell-command-to-string "opam config var prefix") 0 -1)))
(with-temp-buffer
(insert (shell-command-to-string
(concat opam-prefix
"/bin/ocp-edit-mode emacs -load-global-config")))
(eval-buffer)))

(require 'ocp-indent)
;; only supports autocomplete :(
;; (require 'ocp-index)
(require 'tuareg)
(setq ocp-indent-config "with_never=true"))
(use-package tuareg
:ensure tuareg
:commands tuareg-mode
:config
(when (executable-find "opam")
(add-to-list 'load-path
(concat
(replace-regexp-in-string
"\n$" ""
(shell-command-to-string "opam config var share"))
"/emacs/site-lisp"))

(require 'ocp-indent)
(require 'ocp-index)
(setq ocp-indent-config "with_never=true")))


;; Coffee
Expand Down

0 comments on commit 21c8790

Please sign in to comment.