Merge pull request #754 from RadicalZephyr/ocaml-flycheck
Ocaml flycheck
This commit is contained in:
commit
63a63b2f00
1 changed files with 12 additions and 5 deletions
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(prelude-require-packages '(tuareg utop merlin))
|
(prelude-require-packages '(tuareg utop merlin flycheck-ocaml))
|
||||||
|
|
||||||
(require 'tuareg)
|
(require 'tuareg)
|
||||||
(require 'utop)
|
(require 'utop)
|
||||||
|
@ -60,15 +60,22 @@
|
||||||
("\\.topml\\'" . tuareg-mode))
|
("\\.topml\\'" . tuareg-mode))
|
||||||
auto-mode-alist))
|
auto-mode-alist))
|
||||||
|
|
||||||
(add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer)
|
(with-eval-after-load 'merlin
|
||||||
(add-hook 'tuareg-mode-hook 'merlin-mode)
|
;; Disable Merlin's own error checking
|
||||||
|
(setq merlin-error-after-save nil)
|
||||||
|
|
||||||
|
;; Enable Flycheck checker
|
||||||
|
(flycheck-ocaml-setup))
|
||||||
|
|
||||||
|
(add-hook 'tuareg-mode-hook #'utop-setup-ocaml-buffer)
|
||||||
|
(add-hook 'tuareg-mode-hook #'merlin-mode)
|
||||||
|
|
||||||
(add-hook 'tuareg-mode-hook (lambda ()
|
(add-hook 'tuareg-mode-hook (lambda ()
|
||||||
(progn
|
(progn
|
||||||
(define-key tuareg-mode-map (kbd "C-c C-s")
|
(define-key tuareg-mode-map (kbd "C-c C-s")
|
||||||
'utop)
|
'utop)
|
||||||
(setq compile-command
|
(setq compile-command
|
||||||
"opam config exec \"corebuild \""))))
|
"opam config exec corebuild "))))
|
||||||
|
|
||||||
;; Setup merlin completions company is used by default in prelude
|
;; Setup merlin completions company is used by default in prelude
|
||||||
(add-to-list 'company-backends 'merlin-company-backend)
|
(add-to-list 'company-backends 'merlin-company-backend)
|
||||||
|
@ -77,7 +84,7 @@
|
||||||
;; to activate it.
|
;; to activate it.
|
||||||
;; (setq merlin-use-auto-complete-mode t)
|
;; (setq merlin-use-auto-complete-mode t)
|
||||||
|
|
||||||
(setq utop-command "opam config exec \"utop -emacs\""
|
(setq utop-command "opam config exec utop -- -emacs"
|
||||||
merlin-error-after-save nil)
|
merlin-error-after-save nil)
|
||||||
|
|
||||||
(provide 'prelude-ocaml)
|
(provide 'prelude-ocaml)
|
||||||
|
|
Loading…
Reference in a new issue