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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue