adds psc-ide support to purescript layer
This commit is contained in:
parent
af76cd85e4
commit
acd3ffcdd3
|
@ -9,6 +9,7 @@
|
|||
- [[Key bindings][Key bindings]]
|
||||
- [[Purescript][Purescript]]
|
||||
- [[Imports][Imports]]
|
||||
- [[psc-ide][psc-ide]]
|
||||
- [[REPL][REPL]]
|
||||
|
||||
* Description
|
||||
|
@ -17,6 +18,7 @@ This layer provides basic Purescript editing support for spacemacs
|
|||
thanks to the following packages:
|
||||
- [[https://github.com/dysinger/purescript-mode][purescript-mode]]
|
||||
- [[https://github.com/ardumont/emacs-psci][psci]]
|
||||
- [[https://github.com/epost/psc-ide-emacs][psc-ide-emacs]]
|
||||
|
||||
* Install
|
||||
|
||||
|
@ -26,6 +28,8 @@ To use this contribution add it to your =~/.spacemacs=
|
|||
(setq-default dotspacemacs-configuration-layers '(purescript))
|
||||
#+END_SRC
|
||||
|
||||
If you want to get autocompletions and type information you have to install [[https://github.com/kRITZCREEK/psc-ide][psc-ide]].
|
||||
|
||||
* Key bindings
|
||||
|
||||
** Purescript
|
||||
|
@ -39,6 +43,14 @@ To use this contribution add it to your =~/.spacemacs=
|
|||
| ~SPC m i a~ | Align imports |
|
||||
| ~SPC m i n~ | Navigate to the imports |
|
||||
|
||||
*** psc-ide
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+---------------------------------------------------------|
|
||||
| ~SPC m m s~ | Start psc-ide-server |
|
||||
| ~SPC m m l~ | Load a module with its dependencies into psc-ide-server |
|
||||
| ~SPC m m t~ | Show type at point |
|
||||
|
||||
** REPL
|
||||
|
||||
[[https://github.com/ardumont/emacs-psci][psci]] provides a very basic REPL for purescript. The following key
|
||||
|
|
|
@ -10,5 +10,4 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
|
||||
;; Nothing here yet
|
||||
(spacemacs|defvar-company-backends purescript-mode)
|
||||
|
|
|
@ -13,10 +13,15 @@
|
|||
|
||||
(setq purescript-packages
|
||||
'(
|
||||
company
|
||||
purescript-mode
|
||||
psci
|
||||
psc-ide
|
||||
))
|
||||
|
||||
(defun purescript/post-init-company ()
|
||||
(spacemacs|add-company-hook purescript-mode))
|
||||
|
||||
(defun purescript/init-purescript-mode ()
|
||||
(use-package purescript-mode
|
||||
:defer t
|
||||
|
@ -40,3 +45,15 @@
|
|||
"si" 'psci
|
||||
"sm" 'psci/load-module!
|
||||
"sp" 'psci/load-project-modules!))))
|
||||
|
||||
(defun purescript/init-psc-ide ()
|
||||
(use-package psc-ide
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(add-hook 'purescript-mode-hook 'psc-ide-mode)
|
||||
(push 'company-psc-ide-backend company-backends-purescript-mode)
|
||||
(spacemacs/set-leader-keys-for-major-mode 'purescript-mode
|
||||
"ms" 'psc-ide-server-start
|
||||
"ml" 'psc-ide-load-module
|
||||
"mt" 'psc-ide-show-type))))
|
||||
|
|
Loading…
Reference in New Issue