Purescript mode improvements (#4683)
* Purescript mode improvements - Add keybindings - Enable flycheck - Add psci based repl Signed-off-by: Rudi Grinberg <me@rgrinberg.com> * address review Signed-off-by: Rudi Grinberg <me@rgrinberg.com> * address review Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
This commit is contained in:
parent
35b3e6023e
commit
ae75b1e6a8
2 changed files with 20 additions and 12 deletions
|
@ -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))
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue