[haskell] Add history key bindings to haskell ghci repl
This commit adds the C-j, C-k and C-l bindings to haskell's ghci repl, according to spacemacs conventions.
This commit is contained in:
parent
e1ad035513
commit
099ead9b6a
|
@ -1907,6 +1907,11 @@ Other:
|
|||
(thanks to cjay, CthulhuDen and Magnus Therning)
|
||||
- Included =attrap= when =dante= is used (thanks to Pepe Iborra)
|
||||
- Added keybinding ~C-c C-z~ for =haskell-interactive-switch= (thanks to ft)
|
||||
- Added keybindings to the GHCI REPL:
|
||||
- ~C-j~ switch to next history item
|
||||
- ~C-k~ switch to previous history item
|
||||
- ~C-l~ clear the REPL
|
||||
(thanks to Joscha)
|
||||
**** Helm
|
||||
- New packages:
|
||||
- =helm-ls-git= (thanks to duianto)
|
||||
|
|
|
@ -169,7 +169,7 @@ build =ghc-mod=. You can check which version was used by calling
|
|||
=ghc-mod --version=.
|
||||
|
||||
*** =lsp=
|
||||
=lsp= requires an appropriate installation of =hie= to provide the Haskell language server.
|
||||
=lsp= requires an appropriate installation of =hie= to provide the Haskell language server.
|
||||
=hie= is built on =ghc-mod=, so many of the same considerations apply.
|
||||
|
||||
Enabling the =lsp= backend requires the =lsp= layer to be enabled, and provides access to
|
||||
|
@ -272,6 +272,9 @@ REPL commands are prefixed by ~SPC m s~:
|
|||
| ~SPC m s c~ | clear the REPL |
|
||||
| ~SPC m s s~ | show and switch to the REPL |
|
||||
| ~SPC m s S~ | show the REPL without switching to it |
|
||||
| ~C-j~ | switch to next history item |
|
||||
| ~C-k~ | switch to previous history item |
|
||||
| ~C-l~ | clear the REPL |
|
||||
|
||||
** Intero REPL
|
||||
Intero REPL commands are prefixed by ~SPC m i~:
|
||||
|
|
|
@ -232,6 +232,12 @@
|
|||
(interactive)
|
||||
(haskell-process-do-type 1))
|
||||
|
||||
;; repl key bindings
|
||||
(evil-define-key 'insert haskell-interactive-mode-map
|
||||
(kbd "C-j") 'haskell-interactive-mode-history-next
|
||||
(kbd "C-k") 'haskell-interactive-mode-history-previous
|
||||
(kbd "C-l") 'haskell-interactive-mode-clear)
|
||||
|
||||
;; Bind repl
|
||||
(spacemacs/register-repl 'haskell
|
||||
'haskell-interactive-switch "haskell")
|
||||
|
|
Loading…
Reference in a new issue