(when (maybe-require-package 'purescript-mode)
  (when (maybe-require-package 'psc-ide)
    (add-hook 'purescript-mode-hook
              (lambda ()
                (psc-ide-mode)
                (company-mode)
                (flycheck-mode)
                (turn-on-purescript-indentation))))
  (when (maybe-require-package 'add-node-modules-path)
    (after-load 'purescript-mode
      (add-hook 'purescript-mode-hook 'add-node-modules-path))))

(provide 'init-purescript)

(when (maybe-require-package 'purescript-mode)
  (when (maybe-require-package 'psc-ide)
    (add-hook 'purescript-mode-hook
              (lambda ()
                (psc-ide-mode)
                (company-mode)
                (flycheck-mode)
                (turn-on-purescript-indentation))))

  (when (maybe-require-package 'psci)
    (add-hook 'purescript-mode-hook 'inferior-psci-mode))

  (when (maybe-require-package 'add-node-modules-path)
    (after-load 'purescript-mode
      (add-hook 'purescript-mode-hook 'add-node-modules-path))
    (after-load 'psci
      (advice-add 'psci :around (lambda (oldfun &rest args)
                                  (let ((psci/purs-path (or (executable-find "purs")
                                                            psci/purs-path)))
                                    (apply oldfun args)))))))

(provide 'init-purescript)

Add psci support for purescript
Add psci support for purescript

purcell/emacs.d,sgarciac/emacs.d,arthurl/emacs.d,blueseason/emacs.d,gsmlg/emacs.d,svenyurgensson/emacs.d,blueabysm/emacs.d,mmqmzk/emacs.d,wegatron/emacs.d,cjqw/emacs.d,lust4life/emacs.d,braveoyster/emacs.d,kongfy/emacs.d,emuio/emacs.d,qianwan/emacs.d,dcorking/emacs.d,baohaojun/emacs.d,krzysz00/emacs.d,me020523/emacs.d,kindoblue/emacs.d,benkha/emacs.d