diff --git a/modules/lang/purescript/config.el b/modules/lang/purescript/config.el index 96ebd48fb..89d8c5d66 100644 --- a/modules/lang/purescript/config.el +++ b/modules/lang/purescript/config.el @@ -7,19 +7,32 @@ (add-hook! 'purescript-mode-hook #'purescript-indentation-mode #'rainbow-delimiters-mode) + + (map! :localleader + :map purescript-mode-map + "t" #'psc-ide-show-type + "c" #'psc-ide-case-split + "i" #'psc-ide-add-import + "a" #'psc-ide-add-clause + "f" #'psc-ide-flycheck-insert-suggestion + (:prefix ("l" . "load") + "m" #'psc-ide-load-module + "a" #'psc-ide-load-all) + (:prefix ("s" . "server") + "s" #'psc-ide-server-start + "S" #'psc-ide-server-quit)) + + (set-repl-handler! 'purescript-mode #'psci) + (set-lookup-handlers! 'purescript-mode :definition #'psc-ide-goto-definition :documentation #'purescript-pursuit)) -;; (use-package! flycheck-purescript -;; :after purescript-mode -;; :config -;; (add-hook 'flycheck-mode-hook #'flycheck-purescript-setup)) - - (use-package! psc-ide :hook (purescript-mode . psc-ide-mode) :config (remove-hook 'company-backends 'company-psc-ide-backend) + (when (featurep! :checkers syntax) + (psc-ide-flycheck-setup)) (set-company-backend! 'purescript-mode 'company-psc-ide-backend)) diff --git a/modules/lang/purescript/packages.el b/modules/lang/purescript/packages.el index ea6b4a36c..d2a84d2d3 100644 --- a/modules/lang/purescript/packages.el +++ b/modules/lang/purescript/packages.el @@ -1,11 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/purescript/packages.el -;; As far as I can tell, at the moment, flycheck-purescript does not work well -;; due to expecting the compiler to be psc rather than purs. However, one of -;; purescript-mode or psc-ide seems to handle flycheck, so it might be -;; unnecessary altogether. -;;(package! flycheck-purescript :pin "30f0435d5e") - (package! psc-ide :pin "663f4e2cf9cbafdd4b9a60c34346596e2a40c87c") (package! purescript-mode :pin "154ad16b61fb9dec83a6c863ffaf92638278f00f") +(package! psci :pin "95fb5d14033add8fe9c8c6b4379758beb88af1d0")