ocaml: move smartparens config to post-init function
This commit is contained in:
parent
5b3719845a
commit
cacc893c1d
|
@ -18,13 +18,11 @@
|
|||
;; flycheck-ocaml
|
||||
merlin
|
||||
ocp-indent
|
||||
smartparens
|
||||
tuareg
|
||||
utop
|
||||
))
|
||||
|
||||
;;(defun ocaml/post-init-auto-complete ()
|
||||
;; (spacemacs|enable-auto-complete merlin-mode))
|
||||
|
||||
(defun ocaml/post-init-company ()
|
||||
(spacemacs|add-company-hook merlin-mode))
|
||||
|
||||
|
@ -39,8 +37,7 @@
|
|||
(progn
|
||||
(with-eval-after-load 'merlin
|
||||
(setq merlin-error-after-save nil)
|
||||
(flycheck-ocaml-setup))
|
||||
))))
|
||||
(flycheck-ocaml-setup))))))
|
||||
|
||||
(defun ocaml/init-merlin ()
|
||||
(use-package merlin
|
||||
|
@ -74,8 +71,7 @@
|
|||
"hh" 'merlin-document
|
||||
"ht" 'merlin-type-enclosing
|
||||
"hT" 'merlin-type-expr
|
||||
"rd" 'merlin-destruct
|
||||
))))
|
||||
"rd" 'merlin-destruct))))
|
||||
|
||||
(defun ocaml/init-ocp-indent ()
|
||||
(use-package ocp-indent
|
||||
|
@ -83,6 +79,12 @@
|
|||
:init
|
||||
(add-hook 'tuareg-mode-hook 'ocp-indent-caml-mode-setup)))
|
||||
|
||||
(defun ocaml/post-init-smartparens ()
|
||||
(with-eval-after-load 'smartparens
|
||||
;; don't auto-close apostrophes (type 'a = foo) and backticks (`Foo)
|
||||
(sp-local-pair 'tuareg-mode "'" nil :actions nil)
|
||||
(sp-local-pair 'tuareg-mode "`" nil :actions nil)))
|
||||
|
||||
(defun ocaml/init-tuareg ()
|
||||
(use-package tuareg
|
||||
:defer t
|
||||
|
@ -94,12 +96,7 @@
|
|||
"cc" 'compile)
|
||||
;; Make OCaml-generated files invisible to filename completion
|
||||
(dolist (ext '(".cmo" ".cmx" ".cma" ".cmxa" ".cmi" ".cmxs" ".cmt" ".annot"))
|
||||
(add-to-list 'completion-ignored-extensions ext)))
|
||||
:config
|
||||
(with-eval-after-load 'smartparens
|
||||
;; don't auto-close apostrophes (type 'a = foo) and backticks (`Foo)
|
||||
(sp-local-pair 'tuareg-mode "'" nil :actions nil)
|
||||
(sp-local-pair 'tuareg-mode "`" nil :actions nil))))
|
||||
(add-to-list 'completion-ignored-extensions ext)))))
|
||||
|
||||
(defun ocaml/init-utop ()
|
||||
(use-package utop
|
||||
|
|
Loading…
Reference in a new issue